3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-18 22:25:44 +01:00

4.2: a link target's would-be directive escapes inside a directive's content

This commit is contained in:
2026-09-14 23:24:21 +02:00
parent 9c63148e2a
commit 04dc38c5d6
6 changed files with 131 additions and 9 deletions
+5
View File
@@ -56,6 +56,11 @@ export function attributeValue(text: string, kind: AttributeKind): AttributeRead
return overNested(parsed) ? { refusal: 'nesting' } : { value: { kind, value: parsed } }
}
export function holdsInlineDirectiveOpener(text: string): boolean {
for (let index = text.indexOf(':'); index !== -1; index = text.indexOf(':', index + 1)) if (opensInlineDirective(text, index)) return true
return false
}
export function isBareToken(text: string): boolean {
return bareToken.test(text)
}