7
mirror of https://github.com/Hack-a-Day/Vectorscope.git synced 2024-12-23 06:09:31 +00:00
Vectorscope/docs/badge_talk_2023/reveal.js/test/test-markdown-options.js
2023-11-04 00:22:42 +01:00

27 lines
586 B
JavaScript

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
}
});