diff --git a/tests/fixtures/markdowns.js b/tests/fixtures/markdowns.js index d6962514..8db35485 100644 --- a/tests/fixtures/markdowns.js +++ b/tests/fixtures/markdowns.js @@ -46,9 +46,12 @@ const checkboxes = ` - [x] Checked ` +const smartQuotes = 'This is a "QUOTE".' + export default { basic, codeblock, katex, - checkboxes + checkboxes, + smartQuotes } diff --git a/tests/lib/markdown-test.js b/tests/lib/markdown-test.js index 554ea67c..b2a81fdf 100644 --- a/tests/lib/markdown-test.js +++ b/tests/lib/markdown-test.js @@ -25,3 +25,12 @@ test('Markdown.render() should renders checkboxes', t => { const rendered = md.render(markdownFixtures.checkboxes) t.snapshot(rendered) }) + +test('Markdown.render() should text with quotes correctly', t => { + const renderedSmartQuotes = md.render(markdownFixtures.smartQuotes) + t.snapshot(renderedSmartQuotes) + + const newmd = new Markdown({ typographer: false }) + const renderedNonSmartQuotes = newmd.render(markdownFixtures.smartQuotes) + t.snapshot(renderedNonSmartQuotes) +}) diff --git a/tests/lib/snapshots/markdown-test.js.md b/tests/lib/snapshots/markdown-test.js.md index c678fc2f..d4f0469e 100644 --- a/tests/lib/snapshots/markdown-test.js.md +++ b/tests/lib/snapshots/markdown-test.js.md @@ -11,6 +11,16 @@ Generated by [AVA](https://ava.li). `c=pmsqrta2+b2c = pmsqrt{a^2 + b^2}␊ ` +## Markdown.render() should renders checkboxes + +> Snapshot 1 + + `␊ + ` + ## Markdown.render() should renders codeblock correctly > Snapshot 1 @@ -51,14 +61,16 @@ Generated by [AVA](https://ava.li).
  • Twitter
  • Facebook Group
  • ␊ ␊ - + ` -## Markdown.render() should renders checkboxes +## Markdown.render() should text with quotes correctly > Snapshot 1 - `␊ - ` \ No newline at end of file + `

    This is a “QUOTE”.

    ␊ + ` + +> Snapshot 2 + + `

    This is a "QUOTE".

    ␊ + ` diff --git a/tests/lib/snapshots/markdown-test.js.snap b/tests/lib/snapshots/markdown-test.js.snap index a74d193f..71ff221d 100644 Binary files a/tests/lib/snapshots/markdown-test.js.snap and b/tests/lib/snapshots/markdown-test.js.snap differ