Skip to content

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
@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

3 participants