aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-08-06 23:57:42 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-08-06 23:57:42 +0200
commit0fbb676c81ea258cfbfa8f1a726b37edf2bd2b90 (patch)
tree19a1d068f96e5e9be33cb669d02610ecf2f5bd1b /src/Text/Pandoc/Readers
parent124679fd63564d434e2f90616be1c6daebaa22f9 (diff)
downloadpandoc-0fbb676c81ea258cfbfa8f1a726b37edf2bd2b90.tar.gz
MediaWiki reader: properly interpret XML tags in pre environments.
They are meant to be interpreted as literal text in textile. Closes #3042.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index 4ab0243fe..a4de85dfb 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -60,7 +60,7 @@ import Text.Pandoc.Parsing
import Text.Pandoc.Readers.HTML ( htmlTag, isBlockTag, isInlineTag )
import Text.Pandoc.Shared (trim)
import Text.Pandoc.Readers.LaTeX ( rawLaTeXInline, rawLaTeXBlock )
-import Text.HTML.TagSoup (parseTags, innerText, fromAttrib, Tag(..))
+import Text.HTML.TagSoup (fromAttrib, Tag(..))
import Text.HTML.TagSoup.Match
import Data.List ( intercalate, transpose, intersperse )
import Data.Char ( digitToInt, isUpper )
@@ -182,8 +182,7 @@ trimTrailingNewlines = reverse . dropWhile (=='\n') . reverse
codeBlockPre :: Parser [Char] ParserState Blocks
codeBlockPre = try $ do
(t@(TagOpen _ attrs),_) <- htmlTag (tagOpen (=="pre") (const True))
- result' <- (innerText . parseTags) `fmap` -- remove internal tags
- manyTill anyChar (htmlTag (tagClose (=="pre")))
+ result' <- manyTill anyChar (htmlTag (tagClose (=="pre")))
optional blanklines
-- drop leading newline if any
let result'' = case result' of