aboutsummaryrefslogtreecommitdiff
path: root/test/command/5700-metadata-file-2.yml
AgeCommit message (Collapse)AuthorFilesLines
2019-10-10`--metadata-file`: when multiple files specified, second takes precedence...John MacFarlane1-1/+1
on conflicting fields. This changes earlier behavior (but not in a release), where first took precedence. Note that this may seem inconsistent with the behavior of multiple YAML blocks within a document, where the first takes precedence. Still, it is convenient to be able to override defaults with options later on the command line.
2019-08-24Change optMetadataFile type from Maybe to List (#5702)Owen McGrath1-0/+2
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.)