From b0a2ce50ecb1a1531b2f7dc4591c9809bb23ed55 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 15 Jul 2022 18:22:57 +0200 Subject: Fix to use single array for character references --- tests/character_reference.rs | 2 +- tests/commonmark.rs | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'tests') diff --git a/tests/character_reference.rs b/tests/character_reference.rs index fe69a3e..ef2ba0d 100644 --- a/tests/character_reference.rs +++ b/tests/character_reference.rs @@ -13,7 +13,7 @@ fn character_reference() { micromark( "  & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸" ), - "

& © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸

", + "

\u{a0} & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸

", "should support named character references" ); diff --git a/tests/commonmark.rs b/tests/commonmark.rs index dade5ff..79be42a 100644 --- a/tests/commonmark.rs +++ b/tests/commonmark.rs @@ -346,18 +346,20 @@ foo r###"Backslash escapes (23)"### ); - // To do: bug. - // assert_eq!( - // micromark_with_options(r###"  & © Æ Ď - // ¾ ℋ ⅆ - // ∲ ≧̸ - // "###, DANGER), - // r###"

  & © Æ Ď - // ¾ ℋ ⅆ - // ∲ ≧̸

- // "###, - // r###"Entity and numeric character references (24)"### - // ); + assert_eq!( + micromark_with_options( + r###"  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸ +"###, + DANGER + ), + r###"

  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸

+"###, + r###"Entity and numeric character references (24)"### + ); assert_eq!( micromark_with_options( -- cgit