diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-06-24 17:57:10 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-06-24 17:57:10 +0200 |
commit | a3dd207e3b1ebcbcb6cec0f703a695e51ae4ece0 (patch) | |
tree | 7b4bf040da23a03f38efe92a252e187a630a14f6 /tests/character_escape.rs | |
parent | e7b3761c8cd6f0f902dd9927e4fbf2589465ed57 (diff) | |
download | markdown-rs-a3dd207e3b1ebcbcb6cec0f703a695e51ae4ece0.tar.gz markdown-rs-a3dd207e3b1ebcbcb6cec0f703a695e51ae4ece0.tar.bz2 markdown-rs-a3dd207e3b1ebcbcb6cec0f703a695e51ae4ece0.zip |
Add link, images (resource)
This is still some messy code that needs cleaning up, but it adds support for
links and images, of the resource kind (`[a](b)`).
References (`[a][b]`) are parsed and will soon be supported, but need matching.
* Fix bug to pad percent-encoded bytes when normalizing urls
* Fix bug with escapes counting as balancing in destination
* Add `space_or_tab_one_line_ending`, to parse whitespace including up to
one line ending (but not a blank line)
* Add `ParserState` to share codes, definitions, etc
Diffstat (limited to 'tests/character_escape.rs')
-rw-r--r-- | tests/character_escape.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/character_escape.rs b/tests/character_escape.rs index e4f23d2..3e3e839 100644 --- a/tests/character_escape.rs +++ b/tests/character_escape.rs @@ -61,12 +61,11 @@ fn character_escape() { "should not escape in flow html" ); - // To do: link (reference). - // assert_eq!( - // micromark("[foo](/bar\\* \"ti\\*tle\")"), - // "<p><a href=\"/bar*\" title=\"ti*tle\">foo</a></p>", - // "should escape in resource and title" - // ); + assert_eq!( + micromark("[foo](/bar\\* \"ti\\*tle\")"), + "<p><a href=\"/bar*\" title=\"ti*tle\">foo</a></p>", + "should escape in resource and title" + ); // To do: link (reference). // assert_eq!( |