use default
This commit is contained in:
parent
dd6f16bd70
commit
758dfcea5b
2 changed files with 3 additions and 9 deletions
|
@ -93,7 +93,7 @@ pub struct MFile {
|
||||||
|
|
||||||
#[allow(clippy::struct_excessive_bools)]
|
#[allow(clippy::struct_excessive_bools)]
|
||||||
/// Global metadata
|
/// Global metadata
|
||||||
#[derive(Content, Debug, Clone)]
|
#[derive(Content, Debug, Clone, Default)]
|
||||||
pub struct Metadata {
|
pub struct Metadata {
|
||||||
pub info: MFile,
|
pub info: MFile,
|
||||||
pub math: bool,
|
pub math: bool,
|
||||||
|
|
|
@ -13,7 +13,7 @@ use crate::config::FileConfiguration;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
markdown::{read_md, File},
|
markdown::{read_md, File},
|
||||||
metadata::{MFile, MType, Metadata},
|
metadata::{MType, Metadata},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cached]
|
#[cached]
|
||||||
|
@ -72,13 +72,7 @@ fn read_pdf(data: Vec<u8>) -> File {
|
||||||
let pdf = general_purpose::STANDARD.encode(data);
|
let pdf = general_purpose::STANDARD.encode(data);
|
||||||
|
|
||||||
File {
|
File {
|
||||||
metadata: Metadata {
|
metadata: Metadata::default(),
|
||||||
info: MFile::default(),
|
|
||||||
mermaid: false,
|
|
||||||
syntax_highlight: false,
|
|
||||||
math: false,
|
|
||||||
mail_obfsucated: false,
|
|
||||||
},
|
|
||||||
content: format!(
|
content: format!(
|
||||||
r#"<embed
|
r#"<embed
|
||||||
src="data:application/pdf;base64,{pdf}"
|
src="data:application/pdf;base64,{pdf}"
|
||||||
|
|
Loading…
Reference in a new issue