diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-05-10 00:01:59 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-05-10 00:01:59 -0400 |
| commit | ab36311d7cfdffb9645cec2728f5d30fe1ec67f6 (patch) | |
| tree | a1b52b9f23fc401f6b2d7be3d4bbb65b68c94513 /src/node-types.json | |
| parent | add tree-sitter grammar for SiSU Spine markup (diff) | |
grammar: allow multi-line footnote and editor-note bodies
Footnotes and editor notes whose body wraps across physical lines
previously failed to parse because the shared _inline rule excludes
newlines (paragraphs need that to terminate). Add a parallel
_note_inline rule with _note_text_word and _note_text_char fallbacks
that admit \n in text runs, and point footnote / editor_note at it.
The closing }~ / ]~ tokens still terminate the body because they
have higher precedence than the text fallbacks.
Verified against the test corpus (67/67 unit tests pass) and against
real samples: /Free Culture/ (5,690 lines) and /The Autonomous
Contract/, both of which previously errored on this case, now parse
past the multi-line note region.
Side benefit: /Free Culture/'s remaining failure was actually a URL
line being misread as a header_key - that is addressed in a follow-up
commit, not here.
(assisted by Claude-Code)
Diffstat (limited to 'src/node-types.json')
| -rw-r--r-- | src/node-types.json | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/node-types.json b/src/node-types.json index 13c71bb..48b593d 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -465,26 +465,14 @@ "named": true }, { - "type": "editor_note", - "named": true - }, - { "type": "emphasis", "named": true }, { - "type": "footnote", - "named": true - }, - { "type": "image", "named": true }, { - "type": "inline_anchor", - "named": true - }, - { "type": "inserted", "named": true }, @@ -505,10 +493,6 @@ "named": true }, { - "type": "ocn_suppress", - "named": true - }, - { "type": "strikethrough", "named": true }, @@ -631,18 +615,10 @@ "named": true }, { - "type": "editor_note", - "named": true - }, - { "type": "emphasis", "named": true }, { - "type": "footnote", - "named": true - }, - { "type": "footnote_marker", "named": true }, @@ -651,10 +627,6 @@ "named": true }, { - "type": "inline_anchor", - "named": true - }, - { "type": "inserted", "named": true }, @@ -675,10 +647,6 @@ "named": true }, { - "type": "ocn_suppress", - "named": true - }, - { "type": "strikethrough", "named": true }, |
