mirror of
https://github.com/TxtDot/dalet-rs.git
synced 2024-11-24 17:46:20 +03:00
fix: gemtext output
This commit is contained in:
parent
8f1cb86932
commit
4e320d9a44
3 changed files with 5 additions and 5 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -151,7 +151,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dalet"
|
name = "dalet"
|
||||||
version = "1.0.0-pre.11"
|
version = "1.0.0-pre.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"clap",
|
"clap",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dalet"
|
name = "dalet"
|
||||||
version = "1.0.0-pre.11"
|
version = "1.0.0-pre.12"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["artegoser"]
|
authors = ["artegoser"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::typed::{
|
use crate::typed::{
|
||||||
Body, Hl, TNArg,
|
Body, Hl, Page, TNArg,
|
||||||
Tag::{self, *},
|
Tag::{self, *},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ pub enum GemTextParseError {
|
||||||
InvalidLink,
|
InvalidLink,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_gemtext(s: &str) -> Result<Vec<Tag>, GemTextParseError> {
|
pub fn parse_gemtext(s: &str) -> Result<Page, GemTextParseError> {
|
||||||
let mut page: Vec<Tag> = Vec::new();
|
let mut page: Vec<Tag> = Vec::new();
|
||||||
let mut preformatted = false;
|
let mut preformatted = false;
|
||||||
let mut preformatted_text: Vec<String> = Vec::new();
|
let mut preformatted_text: Vec<String> = Vec::new();
|
||||||
|
@ -65,5 +65,5 @@ pub fn parse_gemtext(s: &str) -> Result<Vec<Tag>, GemTextParseError> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(page)
|
Ok(Page { data: page })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue