Skip to content

Commit

Permalink
Add test for matter vs setext
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 27, 2020
1 parent 40ebda5 commit 5e86096
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,16 @@ test('markdown -> html (micromark)', function (t) {
htmlExtensions: [html(yamlAnywhere)]
}),
'<h1>Hello</h1>\n<p>+++</p>',
'should not support custom matters in the middle'
'should support custom matters anywhere'
)

t.deepEqual(
micromark('a\n---\nb\n---', {
extensions: [syntax(yamlAnywhere)],
htmlExtensions: [html(yamlAnywhere)]
}),
'<p>a</p>\n',
'should prefer anywhere matter that could also be seen as headings (setext)'
)

t.deepEqual(
Expand All @@ -239,7 +248,7 @@ test('markdown -> html (micromark)', function (t) {
htmlExtensions: [html(customAndYaml)]
}),
'',
'should not support custom matters in the middle'
'should support two matters w/ the same start, but different ends'
)

t.end()
Expand Down

0 comments on commit 5e86096

Please sign in to comment.