diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-06-20 18:37:09 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-06-20 18:37:09 +0200 |
commit | e869533b99eecdc133ed3b4bedc22d24dc2c2dd9 (patch) | |
tree | f8e921c44774061e1fdca854df124caee2c637a6 /tests | |
parent | 769963fd3fe9e7027915fc0ddfc2b0e881aa6952 (diff) | |
download | markdown-rs-e869533b99eecdc133ed3b4bedc22d24dc2c2dd9.tar.gz markdown-rs-e869533b99eecdc133ed3b4bedc22d24dc2c2dd9.tar.bz2 markdown-rs-e869533b99eecdc133ed3b4bedc22d24dc2c2dd9.zip |
Fix bug with tabs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/definition.rs | 11 | ||||
-rw-r--r-- | tests/misc_tabs.rs | 88 |
2 files changed, 45 insertions, 54 deletions
diff --git a/tests/definition.rs b/tests/definition.rs index f0869a3..c15e44b 100644 --- a/tests/definition.rs +++ b/tests/definition.rs @@ -49,12 +49,11 @@ fn definition() { // "should support line endings in titles" // ); - // To do: some bug - // assert_eq!( - // micromark("[foo]: /url 'title\n\nwith blank line'\n\n[foo]"), - // "<p>[foo]: /url 'title</p>\n<p>with blank line'</p>\n<p>[foo]</p>", - // "should not support blank lines in titles" - // ); + assert_eq!( + micromark("[foo]: /url 'title\n\nwith blank line'\n\n[foo]"), + "<p>[foo]: /url 'title</p>\n<p>with blank line'</p>\n<p>[foo]</p>", + "should not support blank lines in titles" + ); // To do: link (reference). // assert_eq!( diff --git a/tests/misc_tabs.rs b/tests/misc_tabs.rs index 0d05be9..46588e7 100644 --- a/tests/misc_tabs.rs +++ b/tests/misc_tabs.rs @@ -32,12 +32,11 @@ fn tabs_flow() { "should support a 2*SP + HT to start code" ); - // To do: bug with tabs/vs. - // assert_eq!( - // micromark(" \tx"), - // "<pre><code>x\n</code></pre>", - // "should support a 3*SP + HT to start code" - // ); + assert_eq!( + micromark(" \tx"), + "<pre><code>x\n</code></pre>", + "should support a 3*SP + HT to start code" + ); assert_eq!( micromark(" \tx"), @@ -45,54 +44,47 @@ fn tabs_flow() { "should support a 4*SP to start code, and leave the next HT as code data" ); - // To do: bug with tabs/vs. - // assert_eq!( - // micromark(" \t# x"), - // "<pre><code># x\n</code></pre>", - // "should not support a 3*SP + HT to start an ATX heading" - // ); + assert_eq!( + micromark(" \t# x"), + "<pre><code># x\n</code></pre>", + "should not support a 3*SP + HT to start an ATX heading" + ); - // To do: bug with tabs/vs. - // assert_eq!( - // micromark(" \t> x"), - // "<pre><code>> x\n</code></pre>", - // "should not support a 3*SP + HT to start a block quote" - // ); + assert_eq!( + micromark(" \t> x"), + "<pre><code>> x\n</code></pre>", + "should not support a 3*SP + HT to start a block quote" + ); - // To do: bug with tabs/vs. - // assert_eq!( - // micromark(" \t- x"), - // "<pre><code>- x\n</code></pre>", - // "should not support a 3*SP + HT to start a list item" - // ); + assert_eq!( + micromark(" \t- x"), + "<pre><code>- x\n</code></pre>", + "should not support a 3*SP + HT to start a list item" + ); - // To do: bug with tabs/vs. - // assert_eq!( - // micromark(" \t---"), - // "<pre><code>---\n</code></pre>", - // "should not support a 3*SP + HT to start a thematic break" - // ); + assert_eq!( + micromark(" \t---"), + "<pre><code>---\n</code></pre>", + "should not support a 3*SP + HT to start a thematic break" + ); - // To do: bug with tabs/vs. - // assert_eq!( - // micromark(" \t---"), - // "<pre><code>---\n</code></pre>", - // "should not support a 3*SP + HT to start a thematic break" - // ); + assert_eq!( + micromark(" \t---"), + "<pre><code>---\n</code></pre>", + "should not support a 3*SP + HT to start a thematic break" + ); - // To do: bug with tabs/vs. - // assert_eq!( - // micromark(" \t```"), - // "<pre><code>```\n</code></pre>", - // "should not support a 3*SP + HT to start a fenced code" - // ); + assert_eq!( + micromark(" \t```"), + "<pre><code>```\n</code></pre>", + "should not support a 3*SP + HT to start a fenced code" + ); - // To do: bug with tabs/vs. - // assert_eq!( - // micromark(" \t<div>"), - // "<pre><code><div>\n</code></pre>", - // "should not support a 3*SP + HT to start HTML" - // ); + assert_eq!( + micromark(" \t<div>"), + "<pre><code><div>\n</code></pre>", + "should not support a 3*SP + HT to start HTML" + ); assert_eq!( micromark("#\tx\t#\t"), |