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

Answer principles round 1: 0 🔴, 0 🟡 (0 misread); readAsWritten names the emphasis check, the bracket test names the bare case, noDefinitions sorts after linkInLink

This commit is contained in:
2026-10-28 14:50:05 +01:00
committed by Lillem4n
parent 5ede92bf91
commit 6636f01497
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -342,7 +342,7 @@ test('escapes only text that would otherwise open a construct', () => {
assert.equal(emitted('x"_y"'), 'x"\\_y"\n')
})
test('escapes every text bracket in a line where one opens link text, and every text backtick where one opens a code span', () => {
test('escapes every text bracket in a line where one opens link text, none where none does, and every text backtick where one opens a code span', () => {
const emitted = (text: string): string => markdown(adfToLosslessMarkdown(document(paragraph({ text, type: 'text' }))))
assert.equal(emitted('[a](b) [c]'), '\\[a](b) \\[c]\n')
assert.equal(emitted('see [1] and [docs](url) [2]'), 'see \\[1] and \\[docs](url) \\[2]\n')