mirror of
https://github.com/BoostIo/Boostnote
synced 2026-01-30 09:07:21 +00:00
Add configuration to render line breaks as <br> or not
This commit is contained in:
@@ -34,3 +34,12 @@ test('Markdown.render() should text with quotes correctly', t => {
|
||||
const renderedNonSmartQuotes = newmd.render(markdownFixtures.smartQuotes)
|
||||
t.snapshot(renderedNonSmartQuotes)
|
||||
})
|
||||
|
||||
test('Markdown.render() should render line breaks correctly', t => {
|
||||
const renderedBreaks = md.render(markdownFixtures.breaks)
|
||||
t.snapshot(renderedBreaks)
|
||||
|
||||
const newmd = new Markdown({ breaks: false })
|
||||
const renderedNonBreaks = newmd.render(markdownFixtures.breaks)
|
||||
t.snapshot(renderedNonBreaks)
|
||||
})
|
||||
|
||||
@@ -73,4 +73,18 @@ Generated by [AVA](https://ava.li).
|
||||
> Snapshot 2
|
||||
|
||||
`<p data-line="0">This is a "QUOTE".</p>␊
|
||||
|
||||
|
||||
## Markdown.render() should render line breaks correctly
|
||||
|
||||
> Snapshot 1
|
||||
|
||||
`<p data-line="0">This is the first line.<br />␊
|
||||
This is the second line.</p>␊
|
||||
`
|
||||
|
||||
> Snapshot 2
|
||||
|
||||
`<p data-line="0">This is the first line.␊
|
||||
This is the second line.</p>␊
|
||||
`
|
||||
Binary file not shown.
Reference in New Issue
Block a user