summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-03-02 12:52:39 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-03-02 12:52:39 +0300
commita01573692af91f54b5fe6670e4a07fb6a3935181 (patch)
tree19ab7a072f699539a534e3277f1261a65e4a4b53
parent64f8c5d99cb7040479d6baf8950ef991fa23acae (diff)
Muse reader: enable <literal> tags even if amuse extension is enabled
Amusewiki disables <literal> tags for security reasons. If user wants similar behavior in pandoc, RawBlocks and RawInlines can be removed or replaced with filters.
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs2
-rw-r--r--test/Tests/Readers/Muse.hs9
2 files changed, 0 insertions, 11 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index aaa54e65b..c083933ff 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -402,7 +402,6 @@ exampleTag = try $ do
literalTag :: PandocMonad m => MuseParser m (F Blocks)
literalTag = do
- guardDisabled Ext_amuse -- Text::Amuse does not support <literal>
(return . rawBlock) <$> htmlBlock "literal"
where
-- FIXME: Emacs Muse inserts <literal> without style into all output formats, but we assume HTML
@@ -880,7 +879,6 @@ codeTag = do
inlineLiteralTag :: PandocMonad m => MuseParser m (F Inlines)
inlineLiteralTag = do
- guardDisabled Ext_amuse -- Text::Amuse does not support <literal>
(return . rawInline) <$> htmlElement "literal"
where
-- FIXME: Emacs Muse inserts <literal> without style into all output formats, but we assume HTML
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index f326b39d4..4528ac4b1 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -207,9 +207,6 @@ tests =
[ test emacsMuse "Inline literal"
("Foo<literal style=\"html\">lit</literal>bar" =?>
para (text "Foo" <> rawInline "html" "lit" <> text "bar"))
- , "No literal in Text::Amuse" =:
- "Foo<literal style=\"html\">lit</literal>bar" =?>
- para "Foo<literal style=\"html\">lit</literal>bar"
]
]
@@ -475,12 +472,6 @@ tests =
, "</literal>"
] =?>
rawBlock "latex" "\\newpage")
- , "No literal blocks in Text::Amuse" =:
- T.unlines [ "<literal style=\"latex\">"
- , "\\newpage"
- , "</literal>"
- ] =?>
- para "<literal style=\"latex\">\n\\newpage\n</literal>"
]
, "Center" =:
T.unlines [ "<center>"