use trim_start_matches

This commit is contained in:
postscriptum 2025-07-13 16:23:49 +03:00
parent 9a0f9a40bc
commit 0e166fed14

View file

@ -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://")