From 0edc084c5064694544e32e24006d5b7e90d637a7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 17 Feb 2020 15:58:21 -0800 Subject: Revert "Allow specifying string value in metadata using `!!literal` tag." This reverts commit 3493d6afaa6586c46898cf8bdb0c45bb70d31f28. This might be worth considering in the future, but let's not do it yet...the additional complexity needs a better justification. --- src/Text/Pandoc/Readers/Metadata.hs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/Metadata.hs b/src/Text/Pandoc/Readers/Metadata.hs index d91c4a406..23ceb40f9 100644 --- a/src/Text/Pandoc/Readers/Metadata.hs +++ b/src/Text/Pandoc/Readers/Metadata.hs @@ -99,12 +99,10 @@ yamlToMetaValue pBlocks (YAML.Scalar _ x) = YAML.SBool b -> return $ return $ MetaBool b YAML.SFloat d -> return $ return $ MetaString $ tshow d YAML.SInt i -> return $ return $ MetaString $ tshow i - YAML.SUnknown tag t - | (T.takeWhileEnd (/= ':') <$> YE.tagToText tag) == - Just "literal" -> return $ return $ MetaString t - | otherwise -> case checkBoolean t of - Just b -> return $ return $ MetaBool b - Nothing -> toMetaValue pBlocks t + YAML.SUnknown _ t -> + case checkBoolean t of + Just b -> return $ return $ MetaBool b + Nothing -> toMetaValue pBlocks t YAML.SNull -> return $ return $ MetaString "" yamlToMetaValue pBlocks (YAML.Sequence _ _ xs) = do -- cgit v1.2.3