Skip to content

Conversation

@RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Mar 9, 2025

This PR fixes an issue in Slim templates where a single quote ' at the start of the line (excluding white space) is considered a line indicator for verbatim text. It is not considered a string in this scenario.

So something like this:

div
  'Foo'

Will compile to:

<div>Foo'</div>

Fixes: #17081

@RobinMalfait RobinMalfait requested a review from a team as a code owner March 9, 2025 10:08
Copy link
Member

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if our pre-processor logic should also only process stuff per-line so we avoid this kind of behavior? 🤔

@RobinMalfait
Copy link
Member Author

@philipp-spiess I was thinking about that as well, but it makes it potentially harder for other checks where [ and ] needs to be balanced but they might be spread across multiple lines 🤔

@RobinMalfait RobinMalfait merged commit cc3e852 into main Mar 10, 2025
5 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-17081 branch March 10, 2025 10:45
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.

4.0.12 - Regression with SLIM templates (single quotes)

3 participants