diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-18 16:52:07 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-09-18 16:52:07 +0300 |
commit | c7e837f3713ae5e332dd2066e62f1d2d004ef99d (patch) | |
tree | e2d16bdb4a1352bb133f9597a07ac3b5a3a1c9ab | |
parent | 5d023ad5bc648c9ed91d6860f6f706331542bfe5 (diff) | |
download | subplot-c7e837f3713ae5e332dd2066e62f1d2d004ef99d.tar.gz |
feat: allow the `documentclass` field in document metadata
With the new pulldown-cmark parser for codegen, we are explicit about
what fields we allow in the YAML document metadata block. We currently
don't allow the `documentclass` field. Allow it. It's a useful way for
controlling typesetting vie LaTeX to PDF.
Sponsored-by: author
-rw-r--r-- | src/ast.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -279,6 +279,7 @@ struct Metadata { bibliography: Option<Vec<PathBuf>>, bindings: Option<Vec<PathBuf>>, functions: Option<Vec<PathBuf>>, + documentclass: Option<String>, } impl Metadata { @@ -316,6 +317,9 @@ impl Metadata { if let Some(v) = &self.functions { map.insert(s("functions"), meta_path_bufs(v)); } + if let Some(v) = &self.documentclass { + map.insert(s("documentclass"), meta_string(v)); + } event!( Level::TRACE, ?self, |