diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-09-29 21:42:55 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-09-29 21:42:55 -0700 |
commit | d3601726932753f76919f2d052dcd01ce0b54986 (patch) | |
tree | 88d6fd8d8a29e4d2f86899b384e812b2db80ccc6 /src/Text/Pandoc/Readers | |
parent | 779e02126d61ff67dda3ae1ad8b77f2fe5782689 (diff) | |
download | pandoc-d3601726932753f76919f2d052dcd01ce0b54986.tar.gz |
RST reader: Make directive labels case-insensitive.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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 |