Expand description
This crate provides bindings for the hoedown markdown processing library.
It has a Markdown
type which stores markdown text in a Buffer
. The
markdown can then be rendered with any renderer that implements the Render
trait. The library comes with an Html
renderer by default.
let doc = Markdown::new("some _emphasis_ required");
let mut html = Html::new(html::Flags::empty(), 0);
assert_eq!(
html.render(&doc).to_str().unwrap(),
"<p>some <em>emphasis</em> required</p>\n");
Re-exports§
pub use renderer::Render;
pub use renderer::html::Html;
pub use renderer::wrapper::Wrapper;
pub use renderer::trace::Trace;
Modules§
Macros§
Structs§
- Buffer
- Buffer for holding markdown contents
- Extension
- Constants for the various Hoedown extensions
- Markdown
- Markdown document
Constants§
- AUTOLINK
- Automatically link URLs and emails
- DISABLE_
INDENTED_ CODE - Ignore indented code blocks
- FENCED_
CODE - Process fenced code
- FOOTNOTES
- Process footnotes
- HIGHLIGHT
- Process highlight syntax, e.g.
==highlight me==
- MATH
- Process math syntax, e.g.
$$x + y = z$$
- MATH_
EXPLICIT - Process the single dollar math syntax, e.g.
$x + y = 3$
- NO_
INTRA_ EMPHASIS - Don’t parse emphasis inside of words, e.g.
foo_bar_baz
won’t emphasize the ‘bar’ - QUOTE
- Render quotes differently, e.g. the html renderer may use the
<q>
tag - SPACE_
HEADERS - Process ATX header syntax, e.g.
# Topic
- STRIKETHROUGH
- Enable strikethrough syntax, e.g.
~~strike one~~
- SUPERSCRIPT
- Process superscript syntax, e.g.
2^3 = 8
- TABLES
- Process table syntax
- UNDERLINE
- Perform an underline instead of emphasis