diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-05-10 00:04:25 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-05-10 00:04:25 -0400 |
| commit | 8e359296007fc7bf561355a8454b88db4457483b (patch) | |
| tree | 1bc15946de7082923375d4d2c514eb9544b579a7 /src/node-types.json | |
| parent | grammar: restrict header_key to recognised SiSU YAML keys (diff) | |
grammar: promote editor-note channel marker to named node
Editor notes have two semantic channels in original SiSU markup:
~[* ... ]~ asterisk set, general annotations (e.g. on the author)
~[+ ... ]~ plus set, a separate channel (e.g. TODO / review)
These are not interchangeable - the channel is meaningful, and
themes should be free to colour them differently. Promote the
opener from an inline literal to a named child node
(editor_note_marker) on a `marker:` field, and give it the
@attribute capture in highlights.scm - distinct from the generic
@punctuation.special used for ~{ / }~ / ]~.
A bare `~[ ... ]~` without `*` or `+` is intentionally rejected:
authors must pick a channel. This surfaces the markup bug at
/Not Without Help/ line 695 (which uses the bare form) as a parse
error, consistent with the project rule that strict structural
parsing is preferred over silent regex permissiveness.
Test corpus updated to expect the new (editor_note_marker) child.
(assisted by Claude-Code)
Diffstat (limited to 'src/node-types.json')
| -rw-r--r-- | src/node-types.json | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/node-types.json b/src/node-types.json index 48b593d..23a8908 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -451,7 +451,18 @@ { "type": "editor_note", "named": true, - "fields": {}, + "fields": { + "marker": { + "multiple": false, + "required": true, + "types": [ + { + "type": "editor_note_marker", + "named": true + } + ] + } + }, "children": { "multiple": true, "required": false, @@ -1936,6 +1947,10 @@ "named": true }, { + "type": "editor_note_marker", + "named": true + }, + { "type": "footnote_marker", "named": true }, @@ -2092,14 +2107,6 @@ "named": false }, { - "type": "~[*", - "named": false - }, - { - "type": "~[+", - "named": false - }, - { "type": "~{", "named": false } |
