From 220fca9a1d20a55d545e736f14ca21680ac4bd9b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 14 Jun 2021 12:58:10 +1000 Subject: [PATCH] handle
when rendering a single line + case-insensitive matching https://forums.ankiweb.net/t/html-editor-modifies-note-when-a-field-with-break-tags-is-opened/10772 --- rslib/src/text.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/text.rs b/rslib/src/text.rs index b7bfa3f92..ae110119d 100644 --- a/rslib/src/text.rs +++ b/rslib/src/text.rs @@ -106,7 +106,7 @@ lazy_static! { \[/anki:tts\] "#).unwrap(); - static ref PERSISTENT_HTML_SPACERS: Regex = Regex::new("
|
|
|\n").unwrap(); + static ref PERSISTENT_HTML_SPACERS: Regex = Regex::new(r#"(?i)|
|\n"#).unwrap(); static ref UNPRINTABLE_TAGS: Regex = Regex::new( r"(?xs)