From 4fa16b62e5f37d4f0839a2df37e4d9301a88e6d1 Mon Sep 17 00:00:00 2001
From: Lilleman auf Larv \n', 'unsupported-node-shape at /content/0/content/0 line 1 offset 0'],
[' a a Check the collation. Ask ${carry('span', mention, '')} x\n
\n', 'unmappable-html at /content/0/content/0 line 3 offset 40'],
+ ['\n', 'unmappable-html at /content/0/content/0 line 2 offset 38'],
+ ],
'refuses an edit to what a carry element shows': [
[`\n
\n', ' as written here is no inline element of the dialect: found "b\\n\\n"'],
['\n
\n', 'an item\'s line ends at , or at a line feed before the item\'s next block, and its text spells < as <: found "< b\\n\\n"'],
['\n
\n', ' holds its attributes as name="value", each value escaped as text is, then >: found "&b=2\\">x\\n\\n"'],
- ['
a
x
x
a
\n${carry('div', panel, 'Check the collation.
')}\n`, 'a carry element shows its node\'s text as adfToHtml writes it, then ends at ; an edit to it is no edit to the node: found "collation.', end) && !html.startsWith('\n', end)) { - const stop = misread(html, end, "an item's line ends at , or at a line feed before the item's next block, and its text spells < as <", 'no inline element of the dialect') + const lineEnd = "an item's line ends at , or at a line feed before the item's next block" + // After a line's ``, or before a block, no inline element can stand. + const stop = line.value.form === 'bare' && !isBlockStart(html, end) ? misread(html, end, `${lineEnd}, and its text spells < as <`, 'no inline element of the dialect') : { at: end, message: `${lineEnd}: ${foundAt(html, end)}` } return refused('unmappable-html', stop.message, html, stop.at, open.place) } const paragraph = asFirstParagraph({ end, node }, line.value.form, html, index, place) diff --git a/src/html/parse/inline.ts b/src/html/parse/inline.ts index 31c65ad..dd15125 100644 --- a/src/html/parse/inline.ts +++ b/src/html/parse/inline.ts @@ -47,7 +47,7 @@ function readMarked(html: string, index: number, place: Place): ReadNode { at = tag.end } if (at === html.length || html.startsWith('<', at)) { - const stop = misread(html, at, 'a mark element holds one text, or one mark element holding it', 'no mark element of the dialect') + const stop = misread(html, at, 'a mark element holds one text, or one mark element holding it', 'no mark element of the dialect, and a mark element holds one text, or one mark element holding it') return refused('unmappable-html', stop.message, html, stop.at, place) } const text = readText(html, at, marks, place)