From d3601726932753f76919f2d052dcd01ce0b54986 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 29 Sep 2012 21:42:55 -0700 Subject: RST reader: Make directive labels case-insensitive. --- src/Text/Pandoc/Readers/RST.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index e8708e50b..eb8558857 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -45,6 +45,7 @@ import Text.Pandoc.Builder (Inlines, Blocks, trimInlines, (<>)) import qualified Text.Pandoc.Builder as B import Data.Monoid (mconcat, mempty) import Data.Sequence (viewr, ViewR(..)) +import Data.Char (toLower) -- | Parse reStructuredText string and return Pandoc document. readRST :: ReaderOptions -- ^ Reader options @@ -490,7 +491,8 @@ comment = try $ do return mempty directiveLabel :: RSTParser String -directiveLabel = many1Till (letter <|> char '-') (try $ string "::") +directiveLabel = map toLower + <$> many1Till (letter <|> char '-') (try $ string "::") directive :: RSTParser Blocks directive = try $ do -- cgit v1.2.3