damascene-markdown
Markdown → Damascene El transformer.
use *;
use md;
let tree: El = md;
Markdown is defined as a transformation to HTML, and Damascene's widget kit
already echoes most of HTML's shape (text_runs ≈ <p>, hard_break ≈
<br>, span modifiers ≈ inline tags, bullet_list ≈ <ul>, code_block
≈ <pre><code>, …). The transformer walks pulldown-cmark's streaming
event API and assembles an El tree out of those primitives — a column of
blocks an author would have written by hand. The rendered output behaves
like any other Damascene tree: themed surfaces, selection, hit-test,
layout, lint.
Supported: headings, paragraphs with the full inline set, bulleted /
numbered / GFM task lists (nested), block quotes, fenced + indented code
blocks, horizontal rules, GFM tables, and image alt-text placeholders.
md_with_options exposes output-changing parser extensions (smart
punctuation, GFM alert blockquotes).
Features
highlighting(default) — fenced code blocks with a recognised language tag are tokenized throughsyntect(pure Rust, no Conig) and colored with Damascene palette tokens, so a theme swap recolours the syntax run automatically.default-features = falseopts out and shrinks the dependency surface.mathviaMarkdownOptions::math(true)—$…$/$$…$$expressions render throughdamascene_core::math's native box layout (no webview, no raster round-trip). The current slice covers a focused TeX subset: rows, identifiers / numbers / operators,\frac,\sqrt, superscripts, subscripts.html(default-off) — routes inline/block HTML events through thedamascene-htmltransformer instead of dropping them.
The full behaviour contract lives in the crate rustdoc: docs.rs/damascene-markdown.