Skip to content

Fix string interpolation hiliting#6

Open
markw65 wants to merge 1 commit into
orentrutner:masterfrom
markw65:jq-interpolation
Open

Fix string interpolation hiliting#6
markw65 wants to merge 1 commit into
orentrutner:masterfrom
markw65:jq-interpolation

Conversation

@markw65

@markw65 markw65 commented Feb 7, 2022

Copy link
Copy Markdown

Strings can contain arbitrary jq code, embedded between ( and ).

To fix this, we need to match the (...) under strings.

In addition, because the arbitrary jq code could contain balanced
parentheses, we need to match those under punctuation.

Finally, since the code could also contain function calls, don't
include the opening '(' when matching a function call, so that
the parameters are handled by the newly added balanced parenthesis
code.

Strings can contain arbitrary jq code, embedded between \( and ).

To fix this, we need to match the \(...) under strings.

In addition, because the arbitrary jq code could contain balanced
parentheses, we need to match those under punctuation.

Finally, since the code could also contain function calls, don't
include the opening '(' when matching a function call, so that
the parameters are handled by the newly added balanced parenthesis
code.
@markw65

markw65 commented Feb 8, 2022

Copy link
Copy Markdown
Author

Oh. Looks like there's a much more comprehensive pull request which also claims to fix this, and that one's been open for a year, so...

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.

1 participant