From 0eeff9148e327183e532752f46421a75506dd7a6 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 29 Jul 2022 18:22:59 +0200 Subject: Refactor to improve states * Remove custom kind wrappers, use plain bytes instead * Remove `Into`s, use the explicit expected types instead * Refactor to use `slice.as_str` in most places * Remove unneeded unique check before adding a definition * Use a shared CDATA prefix in constants * Inline byte checks into matches * Pass bytes back from parser instead of whole parse state * Refactor to work more often on bytes * Rename custom `size` to `len` --- tests/code_fenced.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/code_fenced.rs') diff --git a/tests/code_fenced.rs b/tests/code_fenced.rs index f251952..99f729e 100644 --- a/tests/code_fenced.rs +++ b/tests/code_fenced.rs @@ -220,6 +220,12 @@ fn code_fenced() { "should support character escapes and character references in info strings" ); + assert_eq!( + micromark("```a\\&b\0c"), + "
\n", + "should encode dangerous characters in languages" + ); + assert_eq!( micromark(" ```\naaa\n ```"), "
aaa\n ```\n
\n", -- cgit