mirror of
https://github.com/TxtDot/dalet-rs.git
synced 2024-11-22 00:36:21 +03:00
fix: gemtext parse whitespace in links
This commit is contained in:
parent
2fd17796c0
commit
1671a8065b
3 changed files with 3 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -151,7 +151,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dalet"
|
name = "dalet"
|
||||||
version = "1.0.0-pre9"
|
version = "1.0.0-pre10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"clap",
|
"clap",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dalet"
|
name = "dalet"
|
||||||
version = "1.0.0-pre9"
|
version = "1.0.0-pre10"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["artegoser"]
|
authors = ["artegoser"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -27,7 +27,7 @@ pub fn parse_gemtext(s: &str) -> Result<Vec<Tag>, GemTextParseError> {
|
||||||
list.clear();
|
list.clear();
|
||||||
} else if line.starts_with("=>") {
|
} else if line.starts_with("=>") {
|
||||||
let body = line.split_off(2);
|
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();
|
let url = body.next().ok_or(GemTextParseError::InvalidLink)?.trim();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue