github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/docs/slides/test/test-markdown-options.js (about)

     1  Reveal.addEventListener( 'ready', function() {
     2  
     3  	QUnit.module( 'Markdown' );
     4  
     5  	test( 'Options are set', function() {
     6  		strictEqual( marked.defaults.smartypants, true );
     7  	});
     8  
     9  	test( 'Smart quotes are activated', function() {
    10  		var text = document.querySelector( '.reveal .slides>section>p' ).textContent;
    11  
    12  		strictEqual( /['"]/.test( text ), false );
    13  		strictEqual( /[“”‘’]/.test( text ), true );
    14  	});
    15  
    16  } );
    17  
    18  Reveal.initialize({
    19  	dependencies: [
    20  		{ src: '../plugin/markdown/marked.js' },
    21  		{ src: '../plugin/markdown/markdown.js' },
    22  	],
    23  	markdown: {
    24  		smartypants: true
    25  	}
    26  });