Commit 372a49f
committed
Two more monogram#12 items, highlighter-only:
#5 — a double-quoted scalar's INVALID escape (`"quoted \' scalar"`: `\'` is not a
valid YAML escape) was left as plain string content. The derived quoted-string
region now emits an `invalid.illegal.constant.character.escape` pattern after the
valid-escape pattern, so an unrecognised `\.` is highlighted (the valid escapes
still win the leftmost tie). Only for backslash-escape strings, not doubled-
delimiter (`''`) ones, where a lone `\` is literal.
#8 — `%YAML 1.1#...`: the glued `#...` (no preceding space) was scoped as a comment.
Per YAML §6.6 a `#` is a comment only at line start or after whitespace, so the
Comment token gains a `notPrecededBy(nonWhitespace)` guard (a portable fixed-width
`(?<!\S)`). Plain scalars already keep a glued `#` as content; this stops the Comment
token from claiming a glued `#` a directive left behind. Parser is unaffected
(src-coverage-yaml alignment still 100%) — the lexer skips comments via the indent
config, so this only changes the highlighter's Comment pattern.
Also un-flag the now-fixed regression cases (#5/#6/#7/#8/#9 drop `bug:true` → hard-
gated; #6/#7/#9 were stale from the earlier fixes). yaml-issue12-regressions now
8 pass / 2 known-bug (#4, #10) / 0 regression. The other six grammars regenerate
byte-identical; agnostic 9/9; sanity 15/15; RedCMD Onigmo diagnostics clean.
Refs #12
1 parent 8762a7b commit 372a49f
4 files changed
Lines changed: 28 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4582 | 4582 | | |
4583 | 4583 | | |
4584 | 4584 | | |
| 4585 | + | |
| 4586 | + | |
| 4587 | + | |
| 4588 | + | |
| 4589 | + | |
| 4590 | + | |
| 4591 | + | |
| 4592 | + | |
| 4593 | + | |
4585 | 4594 | | |
4586 | 4595 | | |
4587 | 4596 | | |
4588 | 4597 | | |
4589 | 4598 | | |
4590 | 4599 | | |
4591 | | - | |
| 4600 | + | |
4592 | 4601 | | |
4593 | 4602 | | |
4594 | 4603 | | |
4595 | | - | |
| 4604 | + | |
4596 | 4605 | | |
4597 | 4606 | | |
4598 | 4607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
283 | 287 | | |
284 | 288 | | |
285 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
0 commit comments