From 9a3cb77fe7dbacdbe8140b201d4287fb86f60b4a Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 10 Mar 2026 21:29:02 +0200 Subject: [PATCH] define shared ESC const, add filter for title --- .../window/tab/item/page/content/text/markdown/tags.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/browser/window/tab/item/page/content/text/markdown/tags.rs b/src/app/browser/window/tab/item/page/content/text/markdown/tags.rs index 0644bbfe..503e6f9a 100644 --- a/src/app/browser/window/tab/item/page/content/text/markdown/tags.rs +++ b/src/app/browser/window/tab/item/page/content/text/markdown/tags.rs @@ -77,7 +77,7 @@ impl Tags { // Cleanup unformatted escape chars let mut cursor = buffer.start_iter(); while let Some((mut match_start, mut match_end)) = - cursor.forward_search("\\", TextSearchFlags::CASE_INSENSITIVE, None) + cursor.forward_search(ESC, TextSearchFlags::CASE_INSENSITIVE, None) { buffer.delete(&mut match_start, &mut match_end); cursor = match_end; @@ -93,7 +93,9 @@ impl Tags { s = reference::strip_tags(&s); s = strike::strip_tags(&s); s = underline::strip_tags(&s); - s // @TODO other tags + s.replace(ESC, "") }) } } + +const ESC: &str = "\\";