git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: Ignore fields ending with _ in YAML headers.
0fa5792John MacFarlane
src/Text/Pandoc/Readers/Markdown.hs+2−2
@@ -248,9 +248,9 @@ yamlTitleBlock = try $ do
248 addWarning (Just pos) "YAML header is not an object"
248 addWarning (Just pos) "YAML header is not an object"
249 return $ return id
249 return $ return id
250
250
251−-- ignore fields starting with _
251+-- ignore fields ending with _
252ignorable :: Text -> Bool
252ignorable :: Text -> Bool
253−ignorable t = (T.pack "_") `T.isPrefixOf` t
253+ignorable t = (T.pack "_") `T.isSuffixOf` t
254
254
255toMetaValue :: ReaderOptions -> Text -> MetaValue
255toMetaValue :: ReaderOptions -> Text -> MetaValue
256toMetaValue opts x =
256toMetaValue opts x =