aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-03-05 08:47:20 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-03-05 08:47:20 -0800
commit3126b00f11a684a20633cdc3810722e2bf210d36 (patch)
treee40ae0b05ac2af19b44b6050d37e8437ff58d6be /src/Text/Pandoc
parent49a80e1652fffddf8732af618923619f07263d9f (diff)
downloadpandoc-3126b00f11a684a20633cdc3810722e2bf210d36.tar.gz
Templates: YAML objects resolve to "true" in conditionals.
Closes #1133. Note: If address is a YAML object and you just have $address$ in your template, the word "true" will appear, which may be unexpected. (Previously nothing would appear.)
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Templates.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs
index ad8838f72..52625abf6 100644
--- a/src/Text/Pandoc/Templates.hs
+++ b/src/Text/Pandoc/Templates.hs
@@ -190,6 +190,7 @@ resolveVar var' val =
Just (String t) -> T.stripEnd t
Just (Number n) -> T.pack $ show n
Just (Bool True) -> "true"
+ Just (Object _) -> "true"
Just _ -> mempty
Nothing -> mempty