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

Fix @-ignoring expressions #157

Merged
merged 6 commits into from
Oct 17, 2023
Merged

Fix @-ignoring expressions #157

merged 6 commits into from
Oct 17, 2023

Conversation

cossssmin
Copy link
Member

@cossssmin cossssmin commented Oct 15, 2023

Description

This PR fixes a couple of issues with the regex used for expressions ignoring through the @{{ }} syntax.

Fixes #156

Fixes

  • fixed an issue where ignored expressions were still being parsed if they were part of a text node; for example, given foo: 'bar' in locals, this:

     ignored: @{{ foo }}
     ignoredUnescaped: @{{{ foo }}}
     rendered: {{ foo }}
    

    ... was incorrectly being rendered as:

     ignored: @bar
     ignoredUnescaped: @{bar}
     rendered: {{ foo }}
    

    It is now correctly rendering as:

     ignored: {{ foo }}
     ignoredUnescaped: {{{ foo }}}
     rendered: bar
    
  • fixed an issue with @-ignoring unescaped expressions ({{{ }}}); for example this:

     <p>ignoredUnescaped: @{{{ foo }}}</p>
    

    ... was rendered as:

     <p>ignoredUnescaped: @{bar}</p>
    

    It is now correctly rendered as:

     <p>ignoredUnescaped: {{{ foo }}}</p>
    

@cossssmin cossssmin requested a review from Scrum October 15, 2023 13:44
@cossssmin
Copy link
Member Author

@Scrum please have a look, thanks!

@Scrum Scrum merged commit 0de1c77 into master Oct 17, 2023
3 checks passed
@Scrum Scrum deleted the textnode-ignore branch October 17, 2023 08:23
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.

Expression ignoring causing unexpected rendering in text nodes
2 participants