fix: #48 markdown.rs 处理 FrontMatter 和 FootnoteDefinition 节点
FrontMatter → CodeBlock(language=yaml) FootnoteDefinition → Paragraph Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
fb67b1c13d
commit
0bca088933
@ -158,6 +158,25 @@ fn collect_blocks<'a>(node: &'a AstNode<'a>, blocks: &mut Vec<DocumentBlock>) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
NodeValue::FrontMatter(content) => {
|
||||||
|
if content.trim().is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(DocumentBlock::CodeBlock {
|
||||||
|
id: block_id(),
|
||||||
|
language: Some("yaml".into()),
|
||||||
|
code: content.clone(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
NodeValue::FootnoteDefinition(_) => {
|
||||||
|
let text = collect_text(child);
|
||||||
|
if text.is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(DocumentBlock::Paragraph { id: block_id(), text })
|
||||||
|
}
|
||||||
|
}
|
||||||
NodeValue::Document
|
NodeValue::Document
|
||||||
| NodeValue::Item(_)
|
| NodeValue::Item(_)
|
||||||
| NodeValue::TableCell
|
| NodeValue::TableCell
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user