mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-07 16:22:42 +00:00
Add test for a pair of inline horizontal breaks
This commit is contained in:
@@ -408,7 +408,7 @@ const nonbreakingSpaces = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
renderer(token) {
|
renderer(token) {
|
||||||
return ` `.repeat(token.length).concat('\n');
|
return ` `.repeat(token.length).concat('');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ describe('Hard Breaks', ()=>{
|
|||||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p> \n\n \n\n \n</p>`);
|
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p> \n\n \n\n \n</p>`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Pair of inline Breaks', function() {
|
||||||
|
const source = ':>>:>>';
|
||||||
|
const rendered = Markdown.render(source).trim();
|
||||||
|
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p> \n \n</p>`);
|
||||||
|
});
|
||||||
|
|
||||||
test('Break directly between two paragraphs', function() {
|
test('Break directly between two paragraphs', function() {
|
||||||
const source = 'Line 1\n:>>\nLine 2';
|
const source = 'Line 1\n:>>\nLine 2';
|
||||||
const rendered = Markdown.render(source).trim();
|
const rendered = Markdown.render(source).trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user