Skip to main content

rumtk_web_render_markdown

Macro rumtk_web_render_markdown 

Source
macro_rules! rumtk_web_render_markdown {
    ( $md:expr ) => { ... };
}
Expand description

If using raw strings, do not leave an extra line. The first input must have characters, or you will get

 blocks regardless of what you do.

ยงExample

use rumtk_web::rumtk_web_render_markdown;

let md = r###"
**Hello World**
"###;
let expected_html = "<p><strong>Hello World</strong></p>\n";

let result = rumtk_web_render_markdown!(md);

assert_eq!(result, expected_html, "The rendered markdown does not match the expected HTML!");