Fix #2720
This commit is contained in:
parent
6138a74231
commit
374b276f5c
2 changed files with 15 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
import * as assert from 'assert';
|
||||
|
||||
import analyze from '../src/mfm/parse';
|
||||
import toHtml from '../src/mfm/html';
|
||||
import syntaxhighlighter from '../src/mfm/parse/core/syntax-highlighter';
|
||||
|
||||
describe('Text', () => {
|
||||
|
@ -170,4 +171,12 @@ describe('Text', () => {
|
|||
assert.equal(html, '<span class="symbol">/</span>');
|
||||
});
|
||||
});
|
||||
|
||||
describe('toHtml', () => {
|
||||
it('br', () => {
|
||||
const input = 'foo\nbar\nbaz';
|
||||
const output = '<p>foo<br>bar<br>baz</p>';
|
||||
assert.equal(toHtml(analyze(input)), output);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue