Handle empty expressions
Dependencies
- [2]
CQEA2ZDIParse evaluated Typst code instead of AST - [3]
BA5Y6VSEOutput Rust code using `syn` - [4]
YKL5NCLHImport items from `syn` - [5]
2N3KOCP7Create MVP Pandoc->Rust compiler - [6]
HEIF2O2EMigrate from `pandoc` to `typst` for AST processing - [7]
GYTRFADRSupport Typst subdirectories - [8]
BSJYWOYSImplement MVP Typst embedding - [9]
JCYJWUI3Add support for various text formats
Change contents
- replacement in docs/test.typ at line 1
= Headinghello[3.242]#let add(x, y) = x + ySum is #add(2, 3) - edit in crates/typser/src/lib.rs at line 16
use typst::syntax::ast::AstNode; - replacement in crates/typser/src/lib.rs at line 321
fn typst_expr_to_xilem(value: &typst::eval::Value) -> syn::Expr {fn typst_expr_to_xilem(value: &typst::eval::Value) -> Option<syn::Expr> { - replacement in crates/typser/src/lib.rs at line 323
typst::eval::Value::Str(string) => syn::Expr::Lit(literal_string(string.as_str())),typst::eval::Value::Str(string) => Some(syn::Expr::Lit(literal_string(string.as_str()))), - replacement in crates/typser/src/lib.rs at line 325
let supported_content = content::SupportedContent::downcast(content).unwrap();supported_content.to_xilem().unwrap()dbg!(content);let supported_content = content::SupportedContent::downcast(content)?;Some(supported_content.to_xilem()?) - replacement in crates/typser/src/lib.rs at line 348
panic!();dbg!(root);todo!(); - edit in crates/typser/src/lib.rs at line 355
// Remove any empty expressions (`None`).filter_map(|expr| expr) - replacement in crates/typser/src/content.rs at line 16
if let Some(heading) = value.to::<HeadingElem>() {if value.is_empty() {None} else if let Some(heading) = value.to::<HeadingElem>() { - replacement in crates/typser/src/content.rs at line 26
Nonetodo!()