aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-05 09:28:44 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-05 09:28:44 +0100
commit7fc6919f9039a3c71028b807d4372f18cf35bee8 (patch)
tree4a9ec29b473231ce73e7aa0c0687d7d36afe601b /test
parentba3ee62323644134f2a5dd3277e3349d3681111a (diff)
downloadpandoc-7fc6919f9039a3c71028b807d4372f18cf35bee8.tar.gz
Markdown reader: Fixed regression on left-biased union for metadata.
When multiple YAML metadata blocks are used, and two define the same field, the value defined first takes precedence, according to the manual. This was changed briefly in ba3ee62323644134f2a5dd3277e3349d3681111a. This commit reverts to the original behavior and adds a test case.
Diffstat (limited to 'test')
-rw-r--r--test/command/multiple-metadata-blocks.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/command/multiple-metadata-blocks.md b/test/command/multiple-metadata-blocks.md
new file mode 100644
index 000000000..27c5e3dae
--- /dev/null
+++ b/test/command/multiple-metadata-blocks.md
@@ -0,0 +1,15 @@
+If multiple blocks define a field, the first is used.
+
+```
+% pandoc -s -t native
+---
+foo: bar
+...
+
+---
+foo: bim
+...
+^D
+Pandoc (Meta {unMeta = fromList [("foo",MetaInlines [Str "bar"])]})
+[]
+```