Updated tests and removed a skipSpaces....
we no longer need it with the change to toKey, and it is expensive to skip spaces after every inline.
This commit is contained in:
parent
35e6c893ec
commit
8390d935d8
2 changed files with 6 additions and 7 deletions
|
@ -521,7 +521,6 @@ atxClosing :: MarkdownParser Attr
|
||||||
atxClosing = try $ do
|
atxClosing = try $ do
|
||||||
attr' <- option nullAttr
|
attr' <- option nullAttr
|
||||||
(guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier)
|
(guardEnabled Ext_mmd_header_identifiers >> mmdHeaderIdentifier)
|
||||||
skipSpaces
|
|
||||||
skipMany (char '#')
|
skipMany (char '#')
|
||||||
skipSpaces
|
skipSpaces
|
||||||
attr <- option attr'
|
attr <- option attr'
|
||||||
|
|
|
@ -240,20 +240,20 @@ tests = [ testGroup "inline code"
|
||||||
"# Header\n[header]\n\n[header ]\n\n[ header]" =?>
|
"# Header\n[header]\n\n[header ]\n\n[ header]" =?>
|
||||||
headerWith ("header",[],[]) 1 "Header"
|
headerWith ("header",[],[]) 1 "Header"
|
||||||
<> para (link "#header" "" (text "header"))
|
<> para (link "#header" "" (text "header"))
|
||||||
<> para (text "[header" <> space <> text "]")
|
<> para (link "#header" "" (text "header"))
|
||||||
<> para (text "[" <> space <> text "header]")
|
<> para (link "#header" "" (text "header"))
|
||||||
, "ATX header with trailing #s" =:
|
, "ATX header with trailing #s" =:
|
||||||
"# Foo bar #\n[foo bar]\n\n[foo bar ]\n\n[ foo bar]" =?>
|
"# Foo bar #\n[foo bar]\n\n[foo bar ]\n\n[ foo bar]" =?>
|
||||||
headerWith ("foo-bar",[],[]) 1 "Foo bar"
|
headerWith ("foo-bar",[],[]) 1 "Foo bar"
|
||||||
<> para (link "#foo-bar" "" (text "foo bar"))
|
<> para (link "#foo-bar" "" (text "foo bar"))
|
||||||
<> para (text "[foo bar" <> space <> text "]")
|
<> para (link "#foo-bar" "" (text "foo bar"))
|
||||||
<> para (text "[" <> space <> text "foo bar]")
|
<> para (link "#foo-bar" "" (text "foo bar"))
|
||||||
, "setext header" =:
|
, "setext header" =:
|
||||||
" Header \n=\n\n[header]\n\n[header ]\n\n[ header]" =?>
|
" Header \n=\n\n[header]\n\n[header ]\n\n[ header]" =?>
|
||||||
headerWith ("header",[],[]) 1 "Header"
|
headerWith ("header",[],[]) 1 "Header"
|
||||||
<> para (link "#header" "" (text "header"))
|
<> para (link "#header" "" (text "header"))
|
||||||
<> para (text "[header" <> space <> text "]")
|
<> para (link "#header" "" (text "header"))
|
||||||
<> para (text "[" <> space <> text "header]")
|
<> para (link "#header" "" (text "header"))
|
||||||
]
|
]
|
||||||
, testGroup "smart punctuation"
|
, testGroup "smart punctuation"
|
||||||
[ test markdownSmart "quote before ellipses"
|
[ test markdownSmart "quote before ellipses"
|
||||||
|
|
Loading…
Add table
Reference in a new issue