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

Answer prose round 1: 0 🔴, 5 🟡; define the closer in place, and say the kept source is one per text

This commit is contained in:
2026-10-18 10:53:55 +02:00
committed by Lillem4n
parent 637fbc914c
commit 5e3f4c688c
5 changed files with 14 additions and 16 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import { losslessMarkdownToAdf } from './parse/markdown-to-adf.ts'
const constructs = ['<!A>', '<??>', '<![CDATA[]]>']
// CommonMark 0.31.2, Raw HTML: the terminator must start after the opener, and may start right after it.
// CommonMark 0.31.2, Raw HTML: the terminator may start right after the opener, never inside it; `<!-->` and `<!--->` are whole comments.
test('an HTML opener reads as HTML only where its terminator starts after it', () => {
const cases: [string, string][] = [...constructs.map((text): [string, string] => [text, 'html']), ['<!---->', 'html'], ['?> <? ?>', 'html'], ['?> <?', 'text'], ['<?>', 'text']]
for (const [text, kind] of cases) {