github pugjs/pug pug-lexer@5.0.1

latest release: pug@3.0.2
3 years ago

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>

Don't miss a new pug release

NewReleases is sending notifications on new releases.