This repository has been archived on 2021-01-24. You can view files and clone it, but cannot push or open issues or pull requests.
retrogaming-slides/reveal.js/test/test-markdown-options.js

27 lines
586 B
JavaScript
Raw Normal View History

2018-07-22 02:56:48 +00:00
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
}
});