test-markdown-options.js 586 B

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