diff --git a/crates/zx_document_core/src/markdown.rs b/crates/zx_document_core/src/markdown.rs index 8c676af..fd28235 100644 --- a/crates/zx_document_core/src/markdown.rs +++ b/crates/zx_document_core/src/markdown.rs @@ -158,6 +158,25 @@ fn collect_blocks<'a>(node: &'a AstNode<'a>, blocks: &mut Vec) { }) } } + 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::Item(_) | NodeValue::TableCell