From 92debe4b9e4bd578290cb24375693d644acb1744 Mon Sep 17 00:00:00 2001 From: Owen McGrath <7798336+owm111@users.noreply.github.com> Date: Sat, 24 Aug 2019 11:41:25 -0500 Subject: Change optMetadataFile type from Maybe to List (#5702) Changed optMetadataFile from `Maybe FilePath` to `[FilePath]`. This allows for multiple YAML metadata files to be added. The new default value has been changed from `Nothing` to `[]`. To account for this change in `Text.Pandoc.App`, `metaDataFromFile` now operates on two `mapM` calls (for `readFileLazy` and `yamlToMeta`) and a fold. Added a test (command/5700.md) which tests this functionality and updated MANUAL.txt, as per the contributing guidelines. With the current behavior, using `foldr1 (<>)`, values within files specified first will be used over those in later files. (If the reverse of this behavior would be preferred, it should be fixed by changing foldr1 to foldl1.) --- MANUAL.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'MANUAL.txt') diff --git a/MANUAL.txt b/MANUAL.txt index 8959d3000..56823e4b3 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -597,13 +597,14 @@ Reader options {.options} `--metadata-file=`*FILE* -: Read metadata from the supplied YAML (or JSON) file. - This option can be used with every input format, but string - scalars in the YAML file will always be parsed as Markdown. - Generally, the input will be handled the same as in - [YAML metadata blocks][Extension: `yaml_metadata_block`]. - Metadata values specified inside the document, or by using `-M`, - overwrite values specified with this option. +: Read metadata from the supplied YAML (or JSON) file. This option can be used + with every input format, but string scalars in the YAML file will always be + parsed as Markdown. Generally, the input will be handled the same as in + [YAML metadata blocks][Extension: `yaml_metadata_block`]. This option can be + used repeatedly to include multiple metadata files; values in files specified + first will be preferred over those specified in later files. Metadata values + specified inside the document, or by using `-M`, overwrite values specified + with this option. `-p`, `--preserve-tabs` -- cgit v1.2.3