aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs1
-rw-r--r--tests/Tests/Readers/Markdown.hs12
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index ab33023bb..ea5f5326d 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -521,7 +521,6 @@ atxClosing :: MarkdownParser Attr
atxClosing = try $ do
attr' <- option nullAttr
(guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier)
- skipSpaces
skipMany (char '#')
skipSpaces
attr <- option attr'
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs
index d5ad07a18..5b39ae7e2 100644
--- a/tests/Tests/Readers/Markdown.hs
+++ b/tests/Tests/Readers/Markdown.hs
@@ -240,20 +240,20 @@ tests = [ testGroup "inline code"
"# Header\n[header]\n\n[header ]\n\n[ header]" =?>
headerWith ("header",[],[]) 1 "Header"
<> para (link "#header" "" (text "header"))
- <> para (text "[header" <> space <> text "]")
- <> para (text "[" <> space <> text "header]")
+ <> para (link "#header" "" (text "header"))
+ <> para (link "#header" "" (text "header"))
, "ATX header with trailing #s" =:
"# Foo bar #\n[foo bar]\n\n[foo bar ]\n\n[ foo bar]" =?>
headerWith ("foo-bar",[],[]) 1 "Foo bar"
<> para (link "#foo-bar" "" (text "foo bar"))
- <> para (text "[foo bar" <> space <> text "]")
- <> para (text "[" <> space <> text "foo bar]")
+ <> para (link "#foo-bar" "" (text "foo bar"))
+ <> para (link "#foo-bar" "" (text "foo bar"))
, "setext header" =:
" Header \n=\n\n[header]\n\n[header ]\n\n[ header]" =?>
headerWith ("header",[],[]) 1 "Header"
<> para (link "#header" "" (text "header"))
- <> para (text "[header" <> space <> text "]")
- <> para (text "[" <> space <> text "header]")
+ <> para (link "#header" "" (text "header"))
+ <> para (link "#header" "" (text "header"))
]
, testGroup "smart punctuation"
[ test markdownSmart "quote before ellipses"