Skip to content

Commit 036ce01

Browse files
committed
Point YAML ledger explicit-key cases at the specific issue, not the list
Three YAML cases (block scalar as an explicit key, anchor in `?`-key position, bare `?` multi-line sequence key) cited RedCMD/YAML-Syntax-Highlighter#1 — but that is the cross-ecosystem aggregator issue LIST, not a specific issue. Retarget them to #12 ("YAML issues"), RedCMD's multi-item report against Monogram where the anchor and explicit-multiline-key repros are filed verbatim and the block-scalar-as-key sits in the same explicit-key scope. The six ecosystem cases keep their specific upstream cites (tmbundle / atom / vscode). No verdict change (YAML still 9/9 vs official 8/9).
1 parent fca5499 commit 036ce01

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ _Each hand-written **official** grammar vs Monogram's **derived** one, on the bu
195195
#### YAML
196196
| issue | Monogram | official |
197197
|---|:--:|:--:|
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 || · |
198+
| [johnsoncodehk/monogram#12](https://github.com/johnsoncodehk/monogram/issues/12) — a block scalar used AS an explicit key is scoped as a key name || · |
199199

200200
<details><summary>… and 8 more both grammars already handle (✓ / ✓)</summary>
201201

@@ -205,8 +205,8 @@ _Each hand-written **official** grammar vs Monogram's **derived** one, on the bu
205205
| [atom/language-yaml#114](https://github.com/atom/language-yaml/issues/114) — a `#` in a block-scalar body is content, not a comment |||
206206
| [tmbundle#38](https://github.com/textmate/yaml.tmbundle/issues/38) — a block scalar with leading/internal EMPTY lines stays one string region |||
207207
| [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 |||
208+
| [johnsoncodehk/monogram#12](https://github.com/johnsoncodehk/monogram/issues/12) — an anchor `&a` in explicit-key (`?`) position is still an anchor |||
209+
| [johnsoncodehk/monogram#12](https://github.com/johnsoncodehk/monogram/issues/12) — a bare `?` opening an explicit multi-line sequence key is the map-key indicator |||
210210
| [atom/language-yaml#119](https://github.com/atom/language-yaml/issues/119) — an escape inside a double-quoted KEY is highlighted |||
211211
| [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 |||
212212

test/yaml-issue-cases.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
// side effects on import). The "official" YAML grammar is the MAINTAINED RedCMD/YAML-Syntax-
33
// Highlighter (microsoft/vscode#232244 switched VS Code off the dead textmate/yaml.tmbundle to it),
44
// so YAML's baseline is a maintained competitor — most of these it ALSO solves. Each id cites the
5-
// underlying upstream tracker; the canonical aggregator is RedCMD/YAML-Syntax-Highlighter#1
6-
// ("Pre-existing grammar issues"), which links the VS Code / textmate-yaml.tmbundle / atom-language-
7-
// yaml issues. The original report against Monogram was johnsoncodehk/monogram#12, since superseded
8-
// by RedCMD's organized #1. Shared by the README cross-language ✓ table (test/issue-table.ts).
5+
// most specific tracker: the ecosystem bugs filed against the official/upstream grammars (VS Code /
6+
// textmate-yaml.tmbundle / atom-language-yaml), and johnsoncodehk/monogram#12 ("YAML issues",
7+
// RedCMD's multi-item report against Monogram) for the explicit-key behaviors that have no single
8+
// dedicated upstream issue. RedCMD/YAML-Syntax-Highlighter#1 ("Pre-existing grammar issues") is the
9+
// broader cross-ecosystem aggregator that links the upstream issues. Shared by the README
10+
// cross-language ✓ table (test/issue-table.ts).
911
//
1012
// Each snippet is VALID YAML; the question is whether the grammar scopes the marked span correctly.
1113
// Same predicate shape as html-issue-cases.ts: {id, title, src, at, nth?, want:(scope)=>boolean}.
@@ -37,11 +39,11 @@ export const cases: YamlCase[] = [
3739
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)
3840

3941
// ── 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',
42+
{ 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',
4143
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',
44+
{ 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',
4345
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',
46+
{ id: 'johnsoncodehk/monogram#12', title: 'a block scalar used AS an explicit key is scoped as a key name', src: '? |\n block key\n: v\n',
4547
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
4648

4749
// ── quoted KEYS carry their escapes / plain scalars carry a string ancestor ──

0 commit comments

Comments
 (0)