Skip to content

honor escapes inside keys in SplitPath#1086

Open
jmestwa-coder wants to merge 1 commit into
openconfig:masterfrom
jmestwa-coder:splitpath-key-escape
Open

honor escapes inside keys in SplitPath#1086
jmestwa-coder wants to merge 1 commit into
openconfig:masterfrom
jmestwa-coder:splitpath-key-escape

Conversation

@jmestwa-coder

Copy link
Copy Markdown

SplitPath treats / inside [...] as part of a key, but it ignored backslash escapes there, so an escaped ] cleared the in-key state and the next / was read as an element separator. PathToString escapes ] in key values but not /, so a key value containing ] followed by / no longer round-trips: StringToStructuredPath splits the element and errors, though extractKV parses it fine. Track escapes inside keys so the escaped ] keeps the key open, leaving the backslash for the key parser.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 88.732% (+0.004%) from 88.728% — jmestwa-coder:splitpath-key-escape into openconfig:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants