Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of $$ in value #1056

Open
shawkins opened this issue Nov 29, 2023 · 1 comment
Open

Handling of $$ in value #1056

shawkins opened this issue Nov 29, 2023 · 1 comment
Labels
bug Something isn't working spec-related

Comments

@shawkins
Copy link
Contributor

The current handling will replace $$ in a value with a single $ - this is due to the internal escaping behavior, which escapes escapes $ as $$. However this behavior isn't documented and can be surprising to users. Should

also account for $$, or should this behavior be documented?

I don't mind submitting a patch if it's the former.

@radcortez
Copy link
Member

The $$ is indeed used as an escape sequence to not expand on expressions.

That particular piece is yet another rule added by MP Config, in which \$ should act as an escape sequence for expressions. Please check #746 for more context.

I believe the expression code blindly escapes expressions with the double $, because there is a flag that can be used to omit the brackets and treat the value as an expression. At this stage, we are never going to turn that flag on, so maybe we can make the escape smarter and only work if square brackets are found after?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working spec-related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants