diff options
author | Daniel Silverstone <dsilvers+gitlab@digital-scurf.org> | 2023-02-01 23:49:11 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers+gitlab@digital-scurf.org> | 2023-02-01 23:49:11 +0000 |
commit | b6df0fa5b7046bad97f63dc928a9776cecaee623 (patch) | |
tree | 7f2fe57569bdf9d77d0bc30e3fac78ba2d32ff92 /src/doc.rs | |
parent | e1d63019fdd6f0d24703197b6a6029f26e6f089f (diff) | |
parent | b160ad5b9f0e38859b0a6d3c3262afbb39067584 (diff) | |
download | subplot-b6df0fa5b7046bad97f63dc928a9776cecaee623.tar.gz |
Merge branch 'liw/refactor-md' into 'main'
improve Markdown API
See merge request subplot/subplot!307
Diffstat (limited to 'src/doc.rs')
-rw-r--r-- | src/doc.rs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -13,7 +13,6 @@ use crate::{Metadata, YamlMetadata}; use crate::{Warning, Warnings}; use std::collections::HashSet; -use std::convert::TryFrom; use std::default::Default; use std::fmt::Debug; use std::fs::read; @@ -105,7 +104,7 @@ impl Document { subplot: PathBuf, markdowns: Vec<PathBuf>, yamlmeta: &YamlMetadata, - mut md: Markdown, + md: Markdown, style: Style, template: Option<&str>, ) -> Result<Document, SubplotError> @@ -147,7 +146,7 @@ impl Document { let mdfile = meta.markdown(); let mdfile = basedir.join(mdfile); - let mut md = Markdown::try_from(mdfile.as_path())?; + let mut md = Markdown::load_file(mdfile.as_path())?; md.set_metadata(&meta); let markdowns = vec![mdfile]; |