diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 4 | ||||
-rw-r--r-- | tests/Tests/Readers/Markdown.hs | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 20a478aa9..41c967cb6 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1561,8 +1561,8 @@ code = try $ do (char '\n' >> notFollowedBy' blankline >> return " ")) (try (skipSpaces >> count (length starts) (char '`') >> notFollowedBy (char '`'))) - attr <- option ([],[],[]) (try $ guardEnabled Ext_inline_code_attributes >> - optional whitespace >> attributes) + attr <- option ([],[],[]) (try $ guardEnabled Ext_inline_code_attributes + >> attributes) return $ return $ B.codeWith attr $ trim $ concat result math :: MarkdownParser (F Inlines) diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index 739763e77..439307dc9 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -149,7 +149,8 @@ tests = [ testGroup "inline code" (codeWith ("",["javascript"],[]) "document.write(\"Hello\");") , "with attribute space" =: "`*` {.haskell .special x=\"7\"}" - =?> para (codeWith ("",["haskell","special"],[("x","7")]) "*") + =?> para (code "*" <> space <> str "{.haskell" <> space <> + str ".special" <> space <> str "x=\"7\"}") ] , testGroup "emph and strong" [ "two strongs in emph" =: |