mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 14:45:44 +01:00
Escape a line against the inline reader's own tokens, in time linear in a run
This commit is contained in:
@@ -235,14 +235,6 @@ export function openingHtmlBlock(line: string, interrupting: boolean): OpenHtmlB
|
||||
return undefined
|
||||
}
|
||||
|
||||
export function opensBracketedAutolink(text: string, index: number): boolean {
|
||||
return readBracketedAutolink(text, index) !== undefined
|
||||
}
|
||||
|
||||
export function opensEmailAutolink(text: string, index: number): boolean {
|
||||
return readEmailAutolink(text, index) !== undefined
|
||||
}
|
||||
|
||||
export function readBracketedAutolink(text: string, index: number): number | undefined {
|
||||
bracketedAutolink.lastIndex = index
|
||||
return bracketedAutolink.exec(text)?.[0].length
|
||||
|
||||
Reference in New Issue
Block a user