diff --git a/test/misc.js b/test/misc.js index e71ad35..5d51a72 100644 --- a/test/misc.js +++ b/test/misc.js @@ -359,6 +359,53 @@ describe('smartquotes', function () { }); +describe('typographer switches', function () { + + it('Should support disabling IP symbols', function () { + var md = markdownit({ + typographer: { + quotes: true, + rare: true, + intellectualProperty: false + } + }); + assert.strictEqual( + md.render('(P) means "phonogram"!!!!!!'), + '
(P) means “phonogram”!!!
\n' + ); + }); + + it('Should support disabling quote replacements', function () { + var md = markdownit({ + typographer: { + quotes: false, + rare: true, + intellectualProperty: true + } + }); + assert.strictEqual( + md.render('Should\'ve registered that (c)!!!!!!'), + 'Should\'ve registered that ©!!!
\n' + ); + }); + + it('Should support disabling rare replacements', function () { + var md = markdownit({ + typographer: { + quotes: true, + rare: false, + intellectualProperty: true + } + }); + assert.strictEqual( + md.render('Definitely should\'ve registered that (c)!!!!!!'), + 'Definitely should’ve registered that ©!!!!!!
\n' + ); + }); + +}); + + describe('Token attributes', function () { it('.attrJoin', function () { var md = markdownit();