aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs46
1 files changed, 28 insertions, 18 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 8c785e002..4510e08ce 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -556,25 +556,35 @@ tableParseCaption = try $ do
-- inline parsers
--
+inlineList :: PandocMonad m => [MuseParser m (F Inlines)]
+inlineList = [ endline
+ , br
+ , anchor
+ , footnote
+ , strong
+ , strongTag
+ , emph
+ , emphTag
+ , superscriptTag
+ , subscriptTag
+ , strikeoutTag
+ , verbatimTag
+ , link
+ , code
+ , codeTag
+ , whitespace
+ , str
+ , symbol
+ ]
+
inline :: PandocMonad m => MuseParser m (F Inlines)
-inline = choice [ br
- , anchor
- , footnote
- , strong
- , strongTag
- , emph
- , emphTag
- , superscriptTag
- , subscriptTag
- , strikeoutTag
- , verbatimTag
- , link
- , code
- , codeTag
- , whitespace
- , str
- , symbol
- ] <?> "inline"
+inline = (choice inlineList) <?> "inline"
+
+endline :: PandocMonad m => MuseParser m (F Inlines)
+endline = try $ do
+ newline
+ notFollowedBy blankline
+ returnF B.softbreak
anchor :: PandocMonad m => MuseParser m (F Inlines)
anchor = try $ do