From 33d2a1a84fb04c0044aa794f6dd2663dac1c06f1 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 18 Nov 2019 23:05:19 +0000 Subject: DokuWiki reader: parse markup inside monospace ('') (#5917) Fixes #5916 --- src/Text/Pandoc/Readers/DokuWiki.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/DokuWiki.hs b/src/Text/Pandoc/Readers/DokuWiki.hs index 3a92cfa19..da6e7df64 100644 --- a/src/Text/Pandoc/Readers/DokuWiki.hs +++ b/src/Text/Pandoc/Readers/DokuWiki.hs @@ -31,7 +31,7 @@ import Text.Pandoc.Definition import Text.Pandoc.Error (PandocError (PandocParsecError)) import Text.Pandoc.Options import Text.Pandoc.Parsing hiding (enclosed, nested) -import Text.Pandoc.Shared (crFilter, trim, underlineSpan, tshow) +import Text.Pandoc.Shared (crFilter, trim, underlineSpan, stringify, tshow) -- | Read DokuWiki from an input string and return a Pandoc document. readDokuWiki :: PandocMonad m @@ -179,7 +179,7 @@ nestedText end = innerSpace <|> countChar 1 nonspaceChar innerSpace = try $ many1Char spaceChar <* notFollowedBy end monospaced :: PandocMonad m => DWParser m B.Inlines -monospaced = try $ B.code <$> enclosed (string "''") nestedText +monospaced = try $ B.code . (T.concat . map stringify . B.toList) <$> enclosed (string "''") nestedInlines subscript :: PandocMonad m => DWParser m B.Inlines subscript = try $ B.subscript <$> between (string "") (try $ string "") nestedInlines -- cgit v1.2.3