diff --git a/src/utils/metadata.rs b/src/utils/metadata.rs index d287bc2..08d075e 100644 --- a/src/utils/metadata.rs +++ b/src/utils/metadata.rs @@ -93,7 +93,7 @@ pub struct MFile { #[allow(clippy::struct_excessive_bools)] /// Global metadata -#[derive(Content, Debug, Clone)] +#[derive(Content, Debug, Clone, Default)] pub struct Metadata { pub info: MFile, pub math: bool, diff --git a/src/utils/misc.rs b/src/utils/misc.rs index bbebd0b..834d565 100644 --- a/src/utils/misc.rs +++ b/src/utils/misc.rs @@ -13,7 +13,7 @@ use crate::config::FileConfiguration; use super::{ markdown::{read_md, File}, - metadata::{MFile, MType, Metadata}, + metadata::{MType, Metadata}, }; #[cached] @@ -72,13 +72,7 @@ fn read_pdf(data: Vec) -> File { let pdf = general_purpose::STANDARD.encode(data); File { - metadata: Metadata { - info: MFile::default(), - mermaid: false, - syntax_highlight: false, - math: false, - mail_obfsucated: false, - }, + metadata: Metadata::default(), content: format!( r#"