feat: render richer blocks and inline nodes (task 0004) #3
Reference in New Issue
Block a user
Delete Branch "task-0004-richer-blocks-and-inline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task:
.claude/tasks/0004-richer-blocks-and-inline.mdSummary
Extends
@kitchen-md/coreand the CLI renderer to cover the rest of the everyday Markdown body, sokitchen viewrenders lists, blockquotes, code, thematic breaks, and inline emphasis faithfully.ListBlock(ordered flag +ListItemBlockcontainer items),BlockquoteBlock,CodeBlock(optional language + literal text),ThematicBreakBlock, and inlineEmphasisNode,StrongNode,CodeSpanNode,LinkNode.RawBlock/RawInline, whose verbatimvalueis position-sliced from the original input — never re-stringified — so unmodelled constructs round-trip byte-for-byte.Deviations
ListItemBlockis scoped toListBlock.items, not the top-levelBlockunion. A list item exists only inside a list, so it is dispatched throughrenderItemContentrather thanrenderBlock, keeping the type as tight as the spec's shape (raised by the Spec review below and addressed).CodeBlock.langis omitted rather than set toundefinedwhen a fence has no language, so the parser output deep-equals{ type: "code", value: … }.valueand are never fed totranslateInline; annotation parsing itself lands in task 0006.No acceptance criteria were dropped.
Review
Risk
Overall: Low
"".Unaddressed findings
Standards: none. No documented-standard violations; the only baseline smell noted was inherent Shotgun Surgery (adding a node kind touches the union, the parse case, and the render case) — that is the intrinsic cost of an explicit AST with exhaustive dispatch, mitigated by the exhaustive
switcharms, and not worth refactoring.Spec: none outstanding. The one finding (the
ListItemBlockwidening) was fixed in this branch, so it is already in the diff.