From 77af25b4c3297cdd011a4c3c2755ffcac9807b7d Mon Sep 17 00:00:00 2001
From: Alexander Krotov <ilabdsf@gmail.com>
Date: Fri, 24 Nov 2017 14:02:43 +0300
Subject: Muse reader: parse markup in definition list terms

---
 src/Text/Pandoc/Readers/Muse.hs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src')

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 >>
-- 
cgit v1.2.3