3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 14:45:44 +01:00

Answer prose round 1: 0 🔴, 7 🟡; the guarantee splits per reader, the spec's portable sentence follows the named errors, item 112 names rows holding no pipe

This commit is contained in:
2026-10-14 00:52:05 +02:00
committed by Lillem4n
parent 40afc48567
commit 5f1c64b371
7 changed files with 34 additions and 30 deletions
+1 -1
View File
@@ -360,7 +360,7 @@ function continuesLazily(walk: Walk, line: Line): boolean {
return !opensBlock(walk.claims, opener)
}
// Every leaf a line can open but a paragraph, a setext underline and indented code.
// Whether the line opens a block other than a paragraph, a setext underline or indented code.
function opensBlock(claims: Claims, opener: string): boolean {
if ((claims.directives && readDirectiveLine(opener) !== undefined) || (claims.pipeTables !== false && claimsPipeLine(opener)) || isThematicBreak(opener)) return true
return atxHeading(opener) !== undefined || openingCodeFence(opener) !== undefined || openingHtmlBlock(opener, true) !== undefined
+1 -1
View File
@@ -10,7 +10,7 @@ export type Claims = {
carryFence: boolean
directives: boolean
highlights: boolean
// `gfm` reads rows with or without the leading `|`, alignment colons dropped; `flavour` only rows opening with `|` over `-` runs.
// `gfm`: a row may drop its leading `|`, and an alignment colon is read and dropped; `flavour`: every row opens with `|`, the delimiter row `-` runs only.
pipeTables: 'flavour' | 'gfm' | false
strikethrough: boolean
taskMarkers: boolean