@@ -31,7 +31,7 @@ import Text.Pandoc.Definition
3131import Text.Pandoc.Error (PandocError (PandocParsecError))
3232import Text.Pandoc.Options
3333import Text.Pandoc.Parsing hiding (enclosed, nested)
34−import Text.Pandoc.Shared (crFilter, trim, underlineSpan, tshow)
34+import Text.Pandoc.Shared (crFilter, trim, underlineSpan, stringify, tshow)
3535
3636-- | Read DokuWiki from an input string and return a Pandoc document.
3737readDokuWiki :: PandocMonad m
@@ -179,7 +179,7 @@ nestedText end = innerSpace <|> countChar 1 nonspaceChar
179179 innerSpace = try $ many1Char spaceChar <* notFollowedBy end
180180
181181monospaced :: PandocMonad m => DWParser m B.Inlines
182−monospaced = try $ B.code <$> enclosed (string "''") nestedText
182+monospaced = try $ B.code . (T.concat . map stringify . B.toList) <$> enclosed (string "''") nestedInlines
183183
184184subscript :: PandocMonad m => DWParser m B.Inlines
185185subscript = try $ B.subscript <$> between (string "<sub>") (try $ string "</sub>") nestedInlines