Skip to content

fix(astro): port the U+2028 trailing-comment terminator from the Svelte masker #4072

Description

@safishamsi

Good first issue. The Svelte masker (#3984) ends a masked <script> block with U+2028 + ; so a trailing // line comment can't swallow the terminator. The Astro masker still uses a bare ;.

Where: graphify/extract.py _astro_mask_non_script
What: replace the single-; terminator with the same byte-neutral U+2028+; form _svelte_mask_non_script uses; add a test with a trailing // comment before </script>.
Acceptance: new Astro test passes; existing Astro tests unchanged.

Activity

  1. added a commit that references this issue on Oct 5, 2026
    674338b
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions