An adapter to allow rendering strings as markdown inside a maud macro using pulldown-cmark efficiently.
At the moment with `maud` v0.11.0 if a consumer of this library passes its markdown through a filter generating an unexpected series of events then `maud-pulldown-cmark` will exit early with an `Err` response, `maud` will just ignore the error and continue rendering the next part of the template. An example: ``` rust #![feature(plugin)] #![plugin(maud_macros)] extern crate maud; extern crate maud_pulldown_cmark; extern crate pulldown_cmark; use maud_pulldown_cmark::Markdown; use pulldown_cmark::{Event, Tag}; fn main() { let events = vec![ Event::Start(Tag::Image("http://example.com/image".into(), "title".into())), Event::Start(Tag::Code), Event::Text("hello".into()), Event::End(Tag::Code), Event::End(Tag::Image("http://example.com/image".into(), "title".into())), ]; let buffer = html!( div { (Markdown::from_events(events.into_iter())) } ); println!("{}", buffer.into_string()); } ``` saved to `examples/invalid.rs` and run with `cargo run --example invalid` gives: ``` <div><img src="http://example.com/image" alt="</div> ``` --- After the update to `maud` v0.12.0 in #8 the same example now gives: ``` <div><img src="http://example.com/image" alt="hello" title="title" /></div> ``` which is more valid, but still is silently dropping some of the input. Hopefully there is some way to report this sort of issue back to the user.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by Nemo157 and has received 5 comments.