diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-08-07 09:26:11 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-08-07 09:26:58 -0700 |
commit | b76203ccf11c44dcea3837d1e06c8a2969be52bc (patch) | |
tree | 357a59479024179d251af7355cc5955df2ddca79 /test/command | |
parent | 030e8969c766446f498a478c142c200946b63089 (diff) | |
download | pandoc-b76203ccf11c44dcea3837d1e06c8a2969be52bc.tar.gz |
Markdown reader: Properly handle boolean values in YAML metadata.
This fixes a regression in 2.2.3, which cause boolean values to
be parsed as MetaInlines instead of MetaBool.
Note also an undocumented (but desirable) change in 2.2.3:
numbers are now parsed as MetaInlines rather than MetaString.
Closes #4819.
Diffstat (limited to 'test/command')
-rw-r--r-- | test/command/4819.md | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/command/4819.md b/test/command/4819.md new file mode 100644 index 000000000..548583387 --- /dev/null +++ b/test/command/4819.md @@ -0,0 +1,50 @@ +``` +% pandoc -f markdown -t native -s +--- +foo: 42 +... +^D +Pandoc (Meta {unMeta = fromList [("foo",MetaInlines [Str "42"])]}) +[] +``` + +``` +% pandoc -f markdown -t native -s +--- +foo: true +... +^D +Pandoc (Meta {unMeta = fromList [("foo",MetaBool True)]}) +[] +``` + +``` +% pandoc -f markdown -t native -s +--- +foo: True +... +^D +Pandoc (Meta {unMeta = fromList [("foo",MetaBool True)]}) +[] +``` + +``` +% pandoc -f markdown -t native -s +--- +foo: FALSE +... +^D +Pandoc (Meta {unMeta = fromList [("foo",MetaBool False)]}) +[] +``` + +``` +% pandoc -f markdown -t native -s +--- +foo: no +... +^D +Pandoc (Meta {unMeta = fromList [("foo",MetaInlines [Str "no"])]}) +[] +``` + |