ignores imports that are found in description blocks by removing the description block before matching
description
"...
it MUST be defined in the same module as the
tailf:unique-selector. For example, the following is illegal:
module y {
...
import x {
prefix x;
}
tailf:unique-selector '/x:server' { // illegal
...
}
}
For each instance of the node where the selector is defined, it
is evaluated, and for each node selected by the selector, a
...";
strips out all comments before looking for imports
module example {
...
import test {prefix test;}
//import ethernet {prefix eth;}
/*
Some example comment...
module example {
...
import test {prefix test;}
*/
SUMMARY
Following on from #64 - match on non-whitespace characters in fetch
This PR also fixes the scenario where an
import x {
can be incorrectly matched in a description block causing a fetch failure, e.g. https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/1671/tailf-common.yang#L1601ISSUE TYPE
COMPONENT NAME
fetch
ADDITIONAL INFORMATION
support imports that have extra whitespace
ignores imports that are found in description blocks by removing the description block before matching
strips out all comments before looking for imports