3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-18 22:25:44 +01:00

Answer stability round 2: 0 🔴, 2 🟡 (0 misread); an item's line names an inline element only on a bare line short of a block, and two refusals pinned to the character they name

This commit is contained in:
2026-10-28 02:06:22 +01:00
committed by Lillem4n
parent 37f9cfc433
commit 4fa16b62e5
3 changed files with 12 additions and 3 deletions
+3 -1
View File
@@ -248,7 +248,9 @@ function readItemLine(html: string, index: number, open: Open): Result<BlockStep
if (!line.ok) return line
const { end, node } = line.value
if (!html.startsWith('</li>', end) && !html.startsWith('\n', end)) {
const stop = misread(html, end, "an item's line ends at </li>, or at a line feed before the item's next block, and its text spells < as &lt;", 'no inline element of the dialect')
const lineEnd = "an item's line ends at </li>, or at a line feed before the item's next block"
// After a line's `</p>`, 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 &lt;`, '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)