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

13b - review nits: README code span, AGENTS.md §2 example, comments, block-directive link message

This commit is contained in:
2026-09-16 23:28:31 +02:00
parent eea9e01d52
commit ba266d26e9
7 changed files with 12 additions and 11 deletions
+3 -1
View File
@@ -20,7 +20,9 @@ export function readDirectiveMark(name: string, attributes: DirectiveAttributes,
export function inlineMarkSpellingFault(name: string): ConvertFault | undefined {
const spelling = markSpelling(name)
if (spelling === undefined) return undefined
return { code: 'unsupported-node-shape', message: `${name} is spelled ${markdownForm(spelling) ?? `${directivePrefix}${name}[…]`}, never as a block directive` }
const directive = `${directivePrefix}${name}[…]`
const forms = spelling.kind === 'link' ? `[x](url) or ${directive}` : (markdownForm(spelling) ?? directive)
return { code: 'unsupported-node-shape', message: `${name} is spelled ${forms}, never as a block directive` }
}
function markdownForm(spelling: MarkSpelling): string | undefined {