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

Emitter 2a: the corpus runner, the canonical serializer and the CommonMark subset

This commit is contained in:
2026-08-24 15:36:05 +02:00
parent d0fcdf596c
commit 3f73497a6f
16 changed files with 976 additions and 35 deletions
+9
View File
@@ -0,0 +1,9 @@
export function longestBacktickRun(text: string): number {
let longest = 0
let current = 0
for (const character of text) {
current = character === '`' ? current + 1 : 0
longest = Math.max(longest, current)
}
return longest
}