extern crate micromark; use micromark::{micromark, micromark_with_options, Constructs, Options}; use pretty_assertions::assert_eq; #[test] fn gfm_task_list_item() -> Result<(), String> { let gfm = Options { constructs: Constructs::gfm(), ..Options::default() }; assert_eq!( micromark("* [x] y."), "
[x]
", "should not support laziness (2)" ); assert_eq!( micromark_with_options( &r###" * [ ] foo * [x] bar - [x] foo - [ ] bar - [x] baz - [ ] bim + [ ] Unchecked? * [x] Checked? + [y] What is this even? - [n]: # [ ] After a definition + [ ] In a setext heading ======================= * In the… [ ] Second paragraph - [ ] With a tab + [X] With an upper case `x` * [ ] In a lazy line - [ ] With two spaces + [x] Two spaces indent * [x] Three spaces indent - [x] Four spaces indent + [x] Five spaces indent [ ] here? * > [ ] here? - [ ]No space? Empty? + [ ] Space after: + [ ]␠ * [ ]␠Text. Tab after: + [ ]␉ * [ ]␉Text. EOL after: + [ ] * [ ] Text. - [ ] after blank? + # [ ] ATX Heading > * [x] In a list in a block quote "### .replace('␠', " ") .replace('␉', "\t"), &gfm )?, r###"In the…
[ ] Second paragraph
x
[x] Five spaces indent
[ ] here?
[ ] here?
Empty?
Space after:
Tab after:
EOL after:
"###, "should handle things like GitHub" ); Ok(()) }
- In a list in a block quote