Enable table extension for markdown, for issue #4

This commit is contained in:
Magnus Hoff 2017-10-12 14:56:43 +02:00
parent eccde9d161
commit 4ed28f99f3

View file

@ -25,7 +25,8 @@ impl<'a, I: Iterator<Item=Event<'a>>> Iterator for EscapeHtml<'a, I> {
} }
pub fn render_markdown(src: &str) -> String { pub fn render_markdown(src: &str) -> String {
let p = EscapeHtml::new(Parser::new(src)); let opts = ::pulldown_cmark::OPTION_ENABLE_TABLES;
let p = EscapeHtml::new(Parser::new_ext(src, opts));
let mut buf = String::new(); let mut buf = String::new();
html::push_html(&mut buf, p); html::push_html(&mut buf, p);
buf buf