Emitter 2a: the corpus runner, the canonical serializer and the CommonMark subset
CI / gate (push) Successful in 5s
CI / gate (push) Successful in 5s
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user