rushdown-fenced-div
rushdown-fenced-div is a small extension crate for rushdown
that adds Pandoc-style fenced div containers.
It parses fenced div blocks opened by ::: fences, supports admonition-style shorthand class or
attribute list, allows nested fenced divs, and provides a default HTML renderer that emits
<div> elements with the parsed attributes.
For the upstream syntax definition, see Pandoc’s Fenced Divs documentation.
Installation
Add the crate to your Cargo.toml:
[]
= "0.12"
= "0.1"
Syntax
Shorthand class:
::: note
Inside the div.
:::
Attached shorthand class:
:::note
Inside the div.
:::
Attribute list:
::: {.note #tip data-kind="callout"}
Inside the div.
:::
Trailing colons after the opener payload:
::: Warning ::::::
Inside the div.
:::
Nested fenced divs:
:::: outer
::: inner
Nested content.
:::
::::
Usage
use new_markdown_to_html;
use parser;
use html;
use ;
Notes
- Trailing colons after a valid opener payload are accepted.
License
MIT