aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 6599ba059..c6a66a1ed 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -442,7 +442,8 @@ orderedList = try $ do
definitionListItem :: PandocMonad m => MuseParser m (F (Inlines, [Blocks]))
definitionListItem = try $ do
- term <- termParser
+ rawTerm <- termParser
+ term <- parseFromString (trimInlinesF . mconcat <$> many inline) rawTerm
many1 spaceChar
string "::"
firstLine <- many $ noneOf "\n"
@@ -450,7 +451,8 @@ definitionListItem = try $ do
let lns = firstLine : restLines
lineContent <- parseFromString (withListContext parseBlocks) $ concat lns ++ "\n"
pure $ do lineContent' <- lineContent
- pure (B.text term, [lineContent'])
+ term' <- term
+ pure (term', [lineContent'])
where
termParser = (guardDisabled Ext_amuse <|> void spaceChar) >> -- Initial space is required by Amusewiki, but not Emacs Muse
many spaceChar >>