Skip to main content

Crate pathland_markdown

Crate pathland_markdown 

Source
Expand description

Shared inline Markdown parser for Pathland.

Parses a small inline subset into a pathland_core::AttributedString:

  • **bold** / __bold__ → FONT_WEIGHT 700
  • *italic* / _italic_ → FONT_STYLE Italic
  • `code` → FONT_DESIGN Monospaced
  • ~~strikethrough~~ → STRIKETHROUGH 1
  • [label](url) → link run (label text is parsed recursively)
  • \ escapes the next character

Intraword underscores stay literal (snake_case_name), matching CommonMark emphasis rules.

The parser is no_std + alloc and is shared by every DSL: the Rust DSL calls parse directly; foreign hosts (Java/JNA) call the C ABI exported by the pathland-markdown-capi cdylib. Block-level Markdown, images, and reference links are out of scope for v1.

Functions§

parse
Parse inline Markdown into an AttributedString.