diff options
author | Hakim El Hattab | 2017-01-10 13:45:52 +0100 |
---|---|---|
committer | Hakim El Hattab | 2017-01-10 13:45:52 +0100 |
commit | a144134b42c15964f469cf4499859268f52ccb46 (patch) | |
tree | 7ef37dadc82e5726e249e5677ec0125691581a75 /test/test-markdown-options.js | |
parent | 713702a0ab81d1756a30e6c14ae49afd42135541 (diff) | |
parent | 97bb6e9b584f6b4eee33c91e04e5a40da358b7cd (diff) |
Merge branch 'dev' of github.com:hakimel/reveal.js
Diffstat (limited to 'test/test-markdown-options.js')
-rw-r--r-- | test/test-markdown-options.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/test-markdown-options.js b/test/test-markdown-options.js new file mode 100644 index 0000000..3ae1350 --- /dev/null +++ b/test/test-markdown-options.js @@ -0,0 +1,26 @@ +Reveal.addEventListener( 'ready', function() { + + QUnit.module( 'Markdown' ); + + test( 'Options are set', function() { + strictEqual( marked.defaults.smartypants, true ); + }); + + test( 'Smart quotes are activated', function() { + var text = document.querySelector( '.reveal .slides>section>p' ).textContent; + + strictEqual( /['"]/.test( text ), false ); + strictEqual( /[“”‘’]/.test( text ), true ); + }); + +} ); + +Reveal.initialize({ + dependencies: [ + { src: '../plugin/markdown/marked.js' }, + { src: '../plugin/markdown/markdown.js' }, + ], + markdown: { + smartypants: true + } +}); |