From f3d0570ef40db701a49473c496a12b7f15e3d215 Mon Sep 17 00:00:00 2001 From: Ruben Smidt Date: Thu, 27 Feb 2020 21:21:35 +0100 Subject: [PATCH] fix(markdown): add missing char to escape --- src/utils/markdown.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/markdown.rs b/src/utils/markdown.rs index 9e5b7d41..5e194988 100644 --- a/src/utils/markdown.rs +++ b/src/utils/markdown.rs @@ -97,6 +97,7 @@ pub fn escape(s: &str) -> String { .replace(")", r"\)") .replace("~", r"\~") .replace("`", r"\`") + .replace(">", r"\>") .replace("#", r"\#") .replace("+", r"\+") .replace("-", r"\-") @@ -218,8 +219,8 @@ mod tests { fn test_escape() { assert_eq!(escape("* foobar *"), r"\* foobar \*"); assert_eq!( - escape(r"_ * [ ] ( ) ~ \ ` # + - = | { } . !"), - r"\_ \* \[ \] \( \) \~ \ \` \# \+ \- \= \| \{ \} \. \!", + escape(r"_ * [ ] ( ) ~ \ ` > # + - = | { } . !"), + r"\_ \* \[ \] \( \) \~ \ \` \> \# \+ \- \= \| \{ \} \. \!", ); }