git.iko.soy/typeable/pandoc
on master help sign in
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.)

commit3126b00f11a684a20633cdc3810722e2bf210d36 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 5 Mar 2014, 08:47 (13 years ago) parent49a80e1
1 file changed+1
src/Text/Pandoc/Templates.hs+1
src/Text/Pandoc/Templates.hs+1
@@ -190,6 +190,7 @@ resolveVar var' val =
190190 Just (String t) -> T.stripEnd t
191191 Just (Number n) -> T.pack $ show n
192192 Just (Bool True) -> "true"
193+ Just (Object _) -> "true"
193194 Just _ -> mempty
194195 Nothing -> mempty
195196