Skip to content

We might not need IgnoreToken anymore #125

Open

Description

@brendt

This used to be added in order to prevent collisions between blade comment {{-- and deletion tags {{-, but I think this has been fixed in another way now, and we can get rid of this part.

Activity

  1. Akiyo974 commented on Oct 26, 2026

    @Akiyo974
    Contributor

    I looked into this: removing IgnoreToken makes the test suite pass, but it's still needed. Addition and deletion are #[After] injections, so their delimiters are still in the content while the language patterns run. Without the ignore tokens, {-MAX_RETRIES=3-} in Bash renders as {<span class="hl-generic">-MAX_RETRIES</span>=…, and the deletion is lost.

    I wrapped each line of the bench fixtures in {- -} and {+ +} (3,946 runs): 608 broken outputs on main, 1,650 without the ignore patterns.

    While doing that I found a bug where the ignore token leaks into the output in embedded languages, fixed in #245. A cleaner long-term option could be to strip these delimiters before patterns run, like {_ _} markers since #238, but that's a bigger change, so I'd rather check with you first.

  2. brendt commented on Oct 27, 2026

    @brendt
    MemberAuthor

    Feel free to look into it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions