Skip to content

Conversation

@Blacksmoke16
Copy link
Member

Fixes #16413

Joins adjacent StringLiteral values before yielding within interpolations to ensure string is properly escaped if needed. E.g. in the following example:

{% begin %}
  {% verbatim do %}
    {%
      puts %(#{2} ##{"{"}}) # => 2 #{}
    %}
  {% end %}
{% end %}

The string value " \#{}" is yielded all at once, versus before each character ( , #, {, and }) were all yielded on their own which prevented proper escaping of the interpolation.

@Blacksmoke16 Blacksmoke16 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser labels Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StringLiterals within MacroVerbatim node strips escaping of escaped # strings for interpolation

1 participant