diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-03-05 08:47:20 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-03-05 08:47:20 -0800 |
commit | 3126b00f11a684a20633cdc3810722e2bf210d36 (patch) | |
tree | e40ae0b05ac2af19b44b6050d37e8437ff58d6be /src/Text/Pandoc | |
parent | 49a80e1652fffddf8732af618923619f07263d9f (diff) | |
download | pandoc-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.hs | 1 |
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 |