fix: gemtext parse whitespace in links

This commit is contained in:
Artemy Egorov 2024-08-04 17:38:52 +03:00
parent 2fd17796c0
commit 1671a8065b
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ pub fn parse_gemtext(s: &str) -> Result<Vec<Tag>, GemTextParseError> {
list.clear();
} else if line.starts_with("=>") {
let body = line.split_off(2);
let mut body = body.trim().splitn(2, " ");
let mut body = body.trim().splitn(2, char::is_whitespace);
let url = body.next().ok_or(GemTextParseError::InvalidLink)?.trim();