@@ -228,24 +228,28 @@ example = try $ do
228228 contents <- manyTill anyChar $ try (optionMaybe blankline >> string "}}}")
229229 return $ return $ B.codeBlock contents
230230
231−exampleTag :: PandocMonad m => MuseParser m (F Blocks)
232−exampleTag = do
233− (attr, contents) <- htmlElement "example"
234− return $ return $ B.codeBlockWith attr $ chop contents
231+-- Trim up to one newline from the beginning and the end,
232+-- in case opening and/or closing tags are on separate lines.
233+chop :: String -> String
234+chop = lchop . rchop
235235 where lchop s = case s of
236236 '\n':ss -> ss
237237 _ -> s
238238 rchop = reverse . lchop . reverse
239− -- Trim up to one newline from the beginning and the end,
240− -- in case opening and/or closing tags are on separate lines.
241− chop = lchop . rchop
239+
240+exampleTag :: PandocMonad m => MuseParser m (F Blocks)
241+exampleTag = do
242+ (attr, contents) <- htmlElement "example"
243+ return $ return $ B.codeBlockWith attr $ chop contents
242244
243245literal :: PandocMonad m => MuseParser m (F Blocks)
244−literal = (return . rawBlock) <$> htmlElement "literal"
246+literal = do
247+ guardDisabled Ext_amuse -- Text::Amuse does not support <literal>
248+ (return . rawBlock) <$> htmlElement "literal"
245249 where
246250 -- FIXME: Emacs Muse inserts <literal> without style into all output formats, but we assume HTML
247251 format (_, _, kvs) = fromMaybe "html" $ lookup "style" kvs
248− rawBlock (attrs, content) = B.rawBlock (format attrs) content
252+ rawBlock (attrs, content) = B.rawBlock (format attrs) $ chop content
249253
250254blockTag :: PandocMonad m
251255 => (Blocks -> Blocks)