You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the YAML issue ledger: specific cites, drop the mislabeled case
Two corrections to the just-added YAML ledger section:
1. The three explicit-key cases cited RedCMD/YAML-Syntax-Highlighter#1 — the
cross-ecosystem aggregator issue LIST, not a specific issue. Retarget the two
that map verbatim (anchor in `?`-key, bare `?` multi-line sequence key) to
#12 ("YAML issues", RedCMD's report against Monogram).
2. Drop the "block scalar used AS an explicit key" case. It claimed official `·`,
but the official (maintained RedCMD) grammar does NOT have this bug: it fully
recognises the construct — `?` → punctuation.definition.map.key, `|` →
keyword.control.flow.block-scalar, content → string.unquoted.block — and
deliberately scopes the key's content as a block-scalar string. RedCMD (the
grammar's author, who filed #12) never reported it, so it is a defensible design
choice, not an official failure. Monogram's entity.name.tag here even mis-scopes
the `|` introducer as a name. Including it as a Monogram-only win was wrong.
YAML ledger is now 8/8 vs the maintained official 8/8 — Monogram matches a
maintained competitor on every filed bug, no inflated wins. Other languages
unchanged.
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ The same question, every language at once: take the bugs reported against each *
66
66
67
67
<!-- issues:start -->
68
68
<!-- generated by `npm run bench:issues` — do not edit by hand -->
69
-
_Each hand-written **official** grammar vs Monogram's **derived** one, on the bugs filed against it: **TypeScript 26/26** (official 8/26) · **TSX 11/11** (official 5/11) · **HTML 20/20** (official 13/20) · **Vue 23/23** (official 18/23) · **YAML 9/9** (official 8/9). Per-issue detail below — auto-generated by `npm run bench:issues`._
69
+
_Each hand-written **official** grammar vs Monogram's **derived** one, on the bugs filed against it: **TypeScript 26/26** (official 8/26) · **TSX 11/11** (official 5/11) · **HTML 20/20** (official 13/20) · **Vue 23/23** (official 18/23) · **YAML 8/8** (official 8/8). Per-issue detail below — auto-generated by `npm run bench:issues`._
70
70
71
71
#### TypeScript
72
72
| issue | Monogram | official |
@@ -193,9 +193,7 @@ _Each hand-written **official** grammar vs Monogram's **derived** one, on the bu
193
193
</details>
194
194
195
195
#### YAML
196
-
| issue | Monogram | official |
197
-
|---|:--:|:--:|
198
-
|[RedCMD/YAML-Syntax-Highlighter#1](https://github.com/RedCMD/YAML-Syntax-Highlighter/issues/1) — a block scalar used AS an explicit key is scoped as a key name | ✓ | · |
196
+
_No asymmetries — both grammars handle all 8 filed bugs below._
199
197
200
198
<details><summary>… and 8 more both grammars already handle (✓ / ✓)</summary>
201
199
@@ -205,8 +203,8 @@ _Each hand-written **official** grammar vs Monogram's **derived** one, on the bu
205
203
|[atom/language-yaml#114](https://github.com/atom/language-yaml/issues/114) — a `#` in a block-scalar body is content, not a comment | ✓ | ✓ |
206
204
|[tmbundle#38](https://github.com/textmate/yaml.tmbundle/issues/38) — a block scalar with leading/internal EMPTY lines stays one string region | ✓ | ✓ |
207
205
|[tmbundle#18](https://github.com/textmate/yaml.tmbundle/issues/18) — JSON-ish punctuation (`{`/`}`) and a tab indicator inside a block scalar stay content | ✓ | ✓ |
208
-
|[RedCMD/YAML-Syntax-Highlighter#1](https://github.com/RedCMD/YAML-Syntax-Highlighter/issues/1) — an anchor `&a` in explicit-key (`?`) position is still an anchor | ✓ | ✓ |
209
-
|[RedCMD/YAML-Syntax-Highlighter#1](https://github.com/RedCMD/YAML-Syntax-Highlighter/issues/1) — a bare `?` opening an explicit multi-line sequence key is the map-key indicator | ✓ | ✓ |
206
+
|[johnsoncodehk/monogram#12](https://github.com/johnsoncodehk/monogram/issues/12) — an anchor `&a` in explicit-key (`?`) position is still an anchor | ✓ | ✓ |
207
+
|[johnsoncodehk/monogram#12](https://github.com/johnsoncodehk/monogram/issues/12) — a bare `?` opening an explicit multi-line sequence key is the map-key indicator | ✓ | ✓ |
210
208
|[atom/language-yaml#119](https://github.com/atom/language-yaml/issues/119) — an escape inside a double-quoted KEY is highlighted | ✓ | ✓ |
211
209
|[tmbundle#39](https://github.com/textmate/yaml.tmbundle/issues/39) — a plain scalar resolving to `null` is lexically a string that resolves to a constant | ✓ | ✓ |
constisAnchor=(s: string)=>s.includes('anchor')&&!!s.replace(/source\.yaml/g,'').match(/entity\.name|variable\.other/);// an anchor scope, not bare source
21
26
constisMapKeyPunct=(s: string)=>s.includes('punctuation.definition.map.key');// the `?` explicit-key indicator
constisTag=(s: string)=>s.includes('entity.name.tag');// scoped as a key NAME (entity.name.tag.yaml)
24
28
conststringResolvesTo=(lang: string)=>(s: string)=>s.includes('string.unquoted')&&s.includes(lang);// plain scalar is lexically a string that RESOLVES to a typed constant
at: '}',want: isBlockScalar},// the `}` is literal block-scalar content, not punctuation — and the indicator follows a TAB (tmbundle#18: `{ }` inside literal style breaks highlighting; #17 is the sibling colon case)
38
42
39
43
// ── explicit-key (`?`) constructs ──
40
-
{id: 'RedCMD/YAML-Syntax-Highlighter#1',title: 'an anchor `&a` in explicit-key (`?`) position is still an anchor',src: '? &a a\n: &b b\n: *a\n',
44
+
{id: 'johnsoncodehk/monogram#12',title: 'an anchor `&a` in explicit-key (`?`) position is still an anchor',src: '? &a a\n: &b b\n: *a\n',
41
45
at: '&a',want: isAnchor},// `&a` after the explicit-key `?` is an anchor (entity.name.type.anchor / variable.other.anchor), not bare source — the original monogram#12 multi-item repro
42
-
{id: 'RedCMD/YAML-Syntax-Highlighter#1',title: 'a bare `?` opening an explicit multi-line sequence key is the map-key indicator',src: '?\n- a\n- b\n:\n- c\n- d\n',
46
+
{id: 'johnsoncodehk/monogram#12',title: 'a bare `?` opening an explicit multi-line sequence key is the map-key indicator',src: '?\n- a\n- b\n:\n- c\n- d\n',
43
47
at: '?',want: isMapKeyPunct},// the lone `?` (its value is the multi-line block sequence below) is punctuation.definition.map.key.yaml — both grammars handle the explicit complex-key form
44
-
{id: 'RedCMD/YAML-Syntax-Highlighter#1',title: 'a block scalar used AS an explicit key is scoped as a key name',src: '? |\n block key\n: v\n',
45
-
at: 'block key',want: isTag},// MONOGRAM-ONLY ✓: Monogram scopes the block-scalar explicit key as a key NAME (entity.name.tag.yaml); the official leaves it string.unquoted.block (it has no entity.name.tag) → only-Monogram
46
-
47
48
// ── quoted KEYS carry their escapes / plain scalars carry a string ancestor ──
48
49
{id: 'atom/language-yaml#119',title: 'an escape inside a double-quoted KEY is highlighted',src: '"foo\\nbar": 23\n',
49
50
at: '\\n',want: isEscape},// the `\n` inside the quoted key `"foo\nbar"` is constant.character.escape (atom#119: keys with escaped chars within are not highlighted correctly) — both grammars sub-scope escapes inside the key now
0 commit comments