mirror of
https://github.com/TxtDot/dalet-rs.git
synced 2024-11-05 17:33:58 +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]]
|
||||
name = "dalet"
|
||||
version = "1.0.0-pre.11"
|
||||
version = "1.0.0-pre.12"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"clap",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "dalet"
|
||||
version = "1.0.0-pre.11"
|
||||
version = "1.0.0-pre.12"
|
||||
edition = "2021"
|
||||
authors = ["artegoser"]
|
||||
license = "MIT"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::typed::{
|
||||
Body, Hl, TNArg,
|
||||
Body, Hl, Page, TNArg,
|
||||
Tag::{self, *},
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,7 @@ pub enum GemTextParseError {
|
|||
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 preformatted = false;
|
||||
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…
Reference in a new issue