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

Keep BlockText's measures as two named records, read its flags through two functions, and claim a marker through one guard

This commit is contained in:
2026-10-30 21:53:59 +01:00
committed by Lillem4n
parent d28bb4a13f
commit 7941972471
6 changed files with 88 additions and 59 deletions
+1 -1
View File
@@ -203,7 +203,7 @@ export function holdsThematicBreak(tail: ThematicBreakTail | undefined, text: st
return text.length >= tail.shortest && text.length <= tail.longest && text.charAt(0) === tail.marker
}
// Every line isThematicBreak accepts passes this, and a joined line passes exactly when each part does, so BlockText derives it from a prefix and its body.
// Every line isThematicBreak accepts passes this.
export function holdsOnlyRuleCharacters(text: string): boolean {
for (let index = 0; index < text.length; index += 1) {
const character = text.charAt(index)