diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2017-11-19 01:23:46 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2017-11-19 02:37:52 +0300 |
commit | 163af3fdee3c09234436ea7aab84a8b29ec1cece (patch) | |
tree | 21515fd521fee88711da59c7ff7c802e72698c99 /src/Text/Pandoc | |
parent | b9cdef03f071b5ced19d094601a2e8cbd16748d6 (diff) | |
download | pandoc-163af3fdee3c09234436ea7aab84a8b29ec1cece.tar.gz |
Muse reader: produce SoftBreaks on newlines
Now wrapping can be preserved with --wrap=preserve
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 46 |
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 |