While we don't support inventory queries yet, this commit extends the reference parser to parse escaped inventory query opening symbols (\$[) the same way as the Python parser, by stripping the \ and producing a literal $[ token. This ensures that escaped inventory queries are parsed correctly by our parser.
Note that our parser doesn't actually parse inventory queries apart from escaped opening symbols. It still just produces a literal token for unescaped inventory queries. Additionally, a double-escaped inventory query is parsed as \ followed by an escaped opening symbol, resulting in a literal token \$[ in the output.
Checklist
[x] The PR has a meaningful title. The title will be used to auto generate the changelog
[x] PR contains a single logical change (to build a better changelog).
[x] Update the documentation.
[x] Update tests.
[x] Categorize the PR by setting a good title and adding one of the labels:
bug, enhancement, documentation, change, breaking, dependency, internal
as they show up in the changelog
Kapitan's fork of Python Reclass supports a second query type which is called "inventory queries", cf. https://github.com/kapicorp/reclass/blob/develop/README-extensions.rst#inventory-queries.
While we don't support inventory queries yet, this commit extends the reference parser to parse escaped inventory query opening symbols (
\$[
) the same way as the Python parser, by stripping the\
and producing a literal$[
token. This ensures that escaped inventory queries are parsed correctly by our parser.Note that our parser doesn't actually parse inventory queries apart from escaped opening symbols. It still just produces a literal token for unescaped inventory queries. Additionally, a double-escaped inventory query is parsed as
\
followed by an escaped opening symbol, resulting in a literal token\$[
in the output.Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
,internal
as they show up in the changelog