Fixed: [Need to add the possibility to use anchors around patterns #51](https://github.com/clicon/cligen/issues/51):

* Dont escape `$` if it is last in a regexp in translation from XML to POSIX.
This commit is contained in:
Olof hagsand 2020-07-27 20:03:52 +02:00
parent 918bf6223b
commit 9d2102cebf
3 changed files with 188 additions and 169 deletions

View file

@ -94,6 +94,8 @@ Expected: July 2020
### Corrected Bugs
* Fixed: [Need to add the possibility to use anchors around patterns #51](https://github.com/clicon/cligen/issues/51):
* Dont escape `$` if it is last in a regexp in translation from XML to POSIX.
* Fixed `CLICON_YANG_UNKNOWN_ANYDATA` for config and state data. This feature introduced in 4.5 didnt really work.
* Fixed: [Double free when using libxml2 as regex engine #117](https://github.com/clicon/clixon/issues/117)
* Fixed: Reading in a yang-spec file exactly the same size as the buffer (1024/2048/4096/...) could leave the buffer not terminated with a 0 byte

View file

@ -179,7 +179,7 @@ regexp_xsd2posix(char *xsd,
}
else if (x == '\\')
esc++;
else if (x == '$')
else if (x == '$' && i != strlen(xsd)-1) /* Escape $ unless it is last */
cprintf(cb, "\\%c", x);
else if (x == ']' && minus){
cprintf(cb, "-]");

File diff suppressed because one or more lines are too long