Crate render_readme

source ·
Expand description

Render Markdown or reStructuredText with syntax highlighting and image filtering similar to GitHub’s

use render_readme::*;
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(3);
let r = Renderer::new(Some(Highlighter::new()));
let _ = r.markdown_str("# Hello", false, None, deadline);
let _ ="# Hello".to_string()), &LinksContext {
    base_url: None,
    nofollow: None,
    own_crate_name: None,
    link_own_crate_to_crates_io: true,
    link_fixer: None,
}, deadline);

Markdown is implemented natively in Rust. RST rendering requires rst2html installed.



  • Describe format/syntax used in the string
  • The different kinds of nodes in the DOM.


  • Callbacks for every image URL in the document


Type Aliases§