aboutsummaryrefslogtreecommitdiff
path: root/test/test-markdown-options.js
blob: 3ae13503a354c695a2f08c6ab43eab1abbb26dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
	}
});