aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-11-25 22:46:25 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2017-11-25 22:46:25 +0300
commitea2ea455b3f7ba5cb4fb9da9b5fd0ef624ab9a3b (patch)
tree2a20f8c88032da2db81db7aec866cd4fc0d2a481 /src/Text
parent887977c421e50f8dc84bd738a401bb3f833f2129 (diff)
downloadpandoc-ea2ea455b3f7ba5cb4fb9da9b5fd0ef624ab9a3b.tar.gz
Muse reader: don't interpret XML entities
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 56ca9b640..2d701fb91 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -58,7 +58,6 @@ import Text.Pandoc.Options
import Text.Pandoc.Parsing
import Text.Pandoc.Readers.HTML (htmlTag)
import Text.Pandoc.Shared (crFilter)
-import Text.Pandoc.XML (fromEntities)
-- | Read Muse from an input string and return a Pandoc document.
readMuse :: PandocMonad m
@@ -667,7 +666,7 @@ strikeoutTag = inlineTag B.strikeout "del"
verbatimTag :: PandocMonad m => MuseParser m (F Inlines)
verbatimTag = do
content <- parseHtmlContent "verbatim" anyChar
- return $ return $ B.text $ fromEntities content
+ return $ return $ B.text content
code :: PandocMonad m => MuseParser m (F Inlines)
code = try $ do
@@ -686,7 +685,7 @@ code = try $ do
codeTag :: PandocMonad m => MuseParser m (F Inlines)
codeTag = do
(attrs, content) <- parseHtmlContentWithAttrs "code" anyChar
- return $ return $ B.codeWith attrs $ fromEntities content
+ return $ return $ B.codeWith attrs content
inlineLiteralTag :: PandocMonad m => MuseParser m (F Inlines)
inlineLiteralTag = do
@@ -696,13 +695,13 @@ inlineLiteralTag = do
where
-- FIXME: Emacs Muse inserts <literal> without style into all output formats, but we assume HTML
format (_, _, kvs) = fromMaybe "html" $ lookup "style" kvs
- rawInline (attrs, content) = B.rawInline (format attrs) $ fromEntities content
+ rawInline (attrs, content) = B.rawInline (format attrs) content
str :: PandocMonad m => MuseParser m (F Inlines)
-str = fmap (return . B.str) (many1 alphaNum <|> count 1 characterReference)
+str = return . B.str <$> many1 alphaNum
symbol :: PandocMonad m => MuseParser m (F Inlines)
-symbol = (return . B.str) <$> count 1 nonspaceChar
+symbol = return . B.str <$> count 1 nonspaceChar
link :: PandocMonad m => MuseParser m (F Inlines)
link = try $ do