mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-18 06:05:43 +01:00
Pin the spelling description's absent case
This commit is contained in:
@@ -5,6 +5,7 @@ import type { AdfAttributes, AdfDocument, AdfMark, AdfNode } from '../../adf/doc
|
||||
import type { JsonValue } from '../../json-value.ts'
|
||||
import type { Result } from '../../result.ts'
|
||||
import { adfToLosslessMarkdown } from '../../index.ts'
|
||||
import { describeCommonMarkSpelling } from './spelling-questions.ts'
|
||||
|
||||
function document(...content: AdfNode[]): AdfDocument {
|
||||
return { content, type: 'doc', version: 1 }
|
||||
@@ -235,3 +236,8 @@ test('separates blocks in a container body by a blank line only where a directiv
|
||||
assert.equal(markdown(adfToLosslessMarkdown(panel(caption, text('a')))), '!adf:panel info\n!adf:caption\nc\n!adf:/caption\na\n!adf:/panel\n')
|
||||
assert.equal(markdown(adfToLosslessMarkdown(panel(paragraph(), text('a')))), '!adf:panel info\n!adf:paragraph\n!adf:/paragraph\na\n!adf:/panel\n')
|
||||
})
|
||||
|
||||
test('describes the spelling of a node CommonMark spells, and none for a node it does not', () => {
|
||||
assert.equal(describeCommonMarkSpelling(paragraph()), 'its text alone')
|
||||
assert.equal(describeCommonMarkSpelling({ type: 'panel' }), undefined)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user