diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2017-11-24 14:02:43 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2017-11-24 14:02:43 +0300 |
commit | 77af25b4c3297cdd011a4c3c2755ffcac9807b7d (patch) | |
tree | be8849df644ca315932453bed00649262fc8fdbe /src/Text/Pandoc | |
parent | 137c7c2a657492c4652d1ebcaceea44ff69f262b (diff) | |
download | pandoc-77af25b4c3297cdd011a4c3c2755ffcac9807b7d.tar.gz |
Muse reader: parse markup in definition list terms
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 6 |
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 >> |