diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2019-11-18 23:05:19 +0000 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-11-18 15:05:19 -0800 |
commit | 33d2a1a84fb04c0044aa794f6dd2663dac1c06f1 (patch) | |
tree | c3dc3fa2a1cd1d2eaab0aa65dc813b2dc42c70c5 /src/Text/Pandoc/Readers | |
parent | 787ad00167cb225817f2b6d7dddb989db52de068 (diff) | |
download | pandoc-33d2a1a84fb04c0044aa794f6dd2663dac1c06f1.tar.gz |
DokuWiki reader: parse markup inside monospace ('') (#5917)
Fixes #5916
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/DokuWiki.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 "<sub>") (try $ string "</sub>") nestedInlines |