Skip to content

Commit c375233

Browse files
gossisamselikoff
authored andcommitted
added test for angle bracket parser
1 parent f434df5 commit c375233

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

tests-node/unit/utils/compile-markdown-test.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const stripIndent = require('common-tags').stripIndent;
55
const compileMarkdown = require('../../../lib/utils/compile-markdown');
66

77
QUnit.module('Unit | compile-markdown', function(hooks) {
8-
test('compacting paragraphs', function(assert) {
8+
test('compacting curly paragraphs', function(assert) {
99
let input = stripIndent`
1010
{{#foo-bar}}
1111
@@ -20,6 +20,24 @@ QUnit.module('Unit | compile-markdown', function(hooks) {
2020
assert.equal(result, expected);
2121
});
2222

23+
test('compacting angle bracket paragraphs', function(assert) {
24+
let input = stripIndent`
25+
<FooBar>
26+
27+
</FooBar>
28+
`;
29+
30+
// TODO: there is a space left before the closing tag but build is not broken :)
31+
let result = compileMarkdown(input, { targetHandlebars: true });
32+
let expected = stripIndent`
33+
<div class="docs-md"><FooBar>
34+
35+
</FooBar></div>
36+
`;
37+
38+
assert.equal(result, expected);
39+
});
40+
2341
test('compacting implicit code blocks', function(assert) {
2442
// Surrounding whitespace + 4-space indent = code block in MD
2543
let input = stripIndent`

0 commit comments

Comments
 (0)