current() reformated as current () in leafref's path
Opened this issue · 0 comments
Gevrai commented
Here is a quick sample model to demonstrate the issue (seen on 2.1)
module example {
namespace "com:example";
prefix "ex";
container some-when {
when "/foo[bar = current()/../baz]";
}
leaf some-ref {
type leafref {
path "/foo[bar = current()/../baz]/id";
}
}
}
Applying the formatter changes only the leafref's xpath (not the when's) to the following
path "/foo[bar = current ()/../baz]/id";
While this is still a valid xpath, I think it shouldn't be reformated, or at the very least it should be coherent between both.
I've tried disabling the 'Code Style' option 'Spaces -> Custom Spacing -> Spaces before left brace' but there were no change to the behavior.