mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 22:55: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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user