Skip to content

pug-lexer@5.0.1

Compare
Choose a tag to compare
@github-actions github-actions released this 28 Feb 19:32
d4b7f60

Bug Fixes

  • Variables starting with keywords cause the regex to "drift" on capture groups, causing errors (#3274)

  • Lexer plugins are not dropped inside tag interpolation (#3296)

    You can use tag interpolation to embed tags in long strings, e.g.

    p.
      This is a #[strong long] string of text.

    Previously, lexer plugins would not work within the #[...] interpolation.

  • Handle escaped unsafe interpolation correctly (#3299)

    If you want to put the literal text #{ in your html, it needs to be escaped to indicate that it should not be treated as interpolation. The same is true of !{ You can escape them by prefixing them with \, e.g.

    p These are some \#{ weird \!{ symbols

    Previously this would have incorrectly converted both escaped sequences to #{, resulting in the html:

    <p>These are some #{ weird #{ symbols</p>

    Now this correctly generates:

    <p>These are some #{ weird !{ symbols</p>