git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: Ignore fields ending with _ in YAML headers.
commit0fa5792790cf06fc4b29d7808916c5bbce664aa4 authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 1 Jul 2013, 22:39 (13 years ago) parentf3f557d
1 file changed+2−2
src/Text/Pandoc/Readers/Markdown.hs+2−2
src/Text/Pandoc/Readers/Markdown.hs+2−2
@@ -248,9 +248,9 @@ yamlTitleBlock = try $ do
248248 addWarning (Just pos) "YAML header is not an object"
249249 return $ return id
250250
251−-- ignore fields starting with _
251+-- ignore fields ending with _
252252ignorable :: Text -> Bool
253−ignorable t = (T.pack "_") `T.isPrefixOf` t
253+ignorable t = (T.pack "_") `T.isSuffixOf` t
254254
255255toMetaValue :: ReaderOptions -> Text -> MetaValue
256256toMetaValue opts x =