From 3126b00f11a684a20633cdc3810722e2bf210d36 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 5 Mar 2014 08:47:20 -0800 Subject: 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.) --- src/Text/Pandoc/Templates.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Text/Pandoc') 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 -- cgit v1.2.3