From 0e166fed14fea5c34b9a2cf33b3309df2878382d Mon Sep 17 00:00:00 2001 From: postscriptum Date: Sun, 13 Jul 2025 16:23:49 +0300 Subject: [PATCH] use `trim_start_matches` --- src/nex/template.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nex/template.rs b/src/nex/template.rs index 16c8f38..7a2bd7b 100644 --- a/src/nex/template.rs +++ b/src/nex/template.rs @@ -111,9 +111,9 @@ fn format_line(b: &mut String, l: &str, f: &Format) { } else if l.starts_with('_') && l.ends_with('_') { b.push_str(l.trim_matches('_').trim()) } else if l.starts_with('#') && !matches!(f, Format::Gemtext) { - b.push_str(l.trim_matches('#').trim()) + b.push_str(l.trim_start_matches('#').trim()) } else if l.starts_with('>') && !matches!(f, Format::Gemtext) { - b.push_str(l.trim_matches('>').trim()) + b.push_str(l.trim_start_matches('>').trim()) } else if (l.starts_with("http://") || l.starts_with("https://") || l.starts_with("nex://")