Commit 69016e8
committed
vue(highlight): emit the raw-embed close rule once, lang-independent (#43)
The force-close orphan-close-line rules (`-close`/`-close-ml`) key on the TAG only — a close line
carries no `lang=` — so emitting them per dialect produced byte-identical regex where only the
first-included fired and the other four were dead (RedCMD #43: "will never match" / "all raw embedded
languages"). The `<script>` tag was the only force-close dialect embed, so ts/tsx/jsx/coffee each shipped
a duplicate close + close-ml; eight dead rules in all.
Emit the close rules once, on the lang-less call, with the default embed — removing the duplicates and
the regex shadowing (duplicate-regex rule groups: 2 → 0). The common `</script>`-on-its-own-line body is
unaffected (handled lang-aware by the per-dialect begin/while contentName); only the rare code-on-the-
close-line orphan body, which is lang-blind by construction (the #85 force-unwind drops that line, so it
cannot carry the open tag's lang — documented tradeoff), now resolves via the neutral default embed
instead of whichever dialect happened to be listed first.
vue.tmLanguage.json −220 lines; all vue gates green (raw-style-embed 18/18, embed-boundary 9/9),
scope-gap:vue unchanged (97.95%), tm-diagnostics clean, suite 39/39. Other #43 items are stale against
the current grammar (the `-inline`/`-close` pairs are complementary `>`-on-line vs deferred-`>` shapes,
not redundant), already fixed (the back-referenced `lang` quote rejects `"less'`), or a deliberate
Onigmo-portability choice (`[Ss][Tt]…` over the non-portable `(?i:style)`).1 parent 9081819 commit 69016e8
2 files changed
Lines changed: 8 additions & 222 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4002 | 4002 | | |
4003 | 4003 | | |
4004 | 4004 | | |
| 4005 | + | |
| 4006 | + | |
| 4007 | + | |
| 4008 | + | |
| 4009 | + | |
| 4010 | + | |
4005 | 4011 | | |
4006 | 4012 | | |
4007 | 4013 | | |
| |||
4020 | 4026 | | |
4021 | 4027 | | |
4022 | 4028 | | |
4023 | | - | |
4024 | | - | |
| 4029 | + | |
4025 | 4030 | | |
| 4031 | + | |
4026 | 4032 | | |
4027 | 4033 | | |
4028 | 4034 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments