mirror of
https://codeberg.org/postscriptum/snac2nex.git
synced 2026-03-31 21:25:28 +00:00
use trim_start_matches
This commit is contained in:
parent
9a0f9a40bc
commit
0e166fed14
1 changed files with 2 additions and 2 deletions
|
|
@ -111,9 +111,9 @@ fn format_line(b: &mut String, l: &str, f: &Format) {
|
||||||
} else if l.starts_with('_') && l.ends_with('_') {
|
} else if l.starts_with('_') && l.ends_with('_') {
|
||||||
b.push_str(l.trim_matches('_').trim())
|
b.push_str(l.trim_matches('_').trim())
|
||||||
} else if l.starts_with('#') && !matches!(f, Format::Gemtext) {
|
} 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) {
|
} 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://")
|
} else if (l.starts_with("http://")
|
||||||
|| l.starts_with("https://")
|
|| l.starts_with("https://")
|
||||||
|| l.starts_with("nex://")
|
|| l.starts_with("nex://")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue