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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user