From 89b580ab5278424f22cd7ac2be11c3d15beb8f79 Mon Sep 17 00:00:00 2001 From: Jade Date: Fri, 30 Jul 2021 01:17:02 -0700 Subject: [PATCH] Add a test for the table div-wrapping --- src/utils/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 174fcceb..cd0a4837 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -257,6 +257,22 @@ mod tests { ); } + #[test] + fn it_can_wrap_tables() { + let src = r#" +| Original | Punycode | Punycode + Encoding | +|-----------------|-----------------|---------------------| +| føø | f-5gaa | f_5gaa | +"#; + let out = r#" +
+ +
OriginalPunycodePunycode + Encoding
føøf-5gaaf_5gaa
+
+"#.trim(); + assert_eq!(render_markdown(src, false), out); + } + #[test] fn it_can_keep_quotes_straight() { assert_eq!(render_markdown("'one'", false), "

'one'

\n");