test-markdown-external.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Test Markdown</title>
  6. <link rel="stylesheet" href="../dist/reveal.css">
  7. <link rel="stylesheet" href="qunit-2.5.0.css">
  8. </head>
  9. <body style="overflow: auto;">
  10. <div id="qunit"></div>
  11. <div id="qunit-fixture"></div>
  12. <div class="reveal" style="display: none;">
  13. <div class="slides">
  14. <section data-markdown="simple.md" data-separator="^\r?\n\r?\n\r?\n" data-separator-vertical="^\r?\n\r?\n"></section>
  15. </div>
  16. </div>
  17. <script src="qunit-2.5.0.js"></script>
  18. <script type="module">
  19. import '../js/index.js'
  20. import Markdown from '../plugin/markdown/markdown.js'
  21. Reveal.initialize({
  22. dependencies: [ Markdown ]
  23. }).then( function() {
  24. QUnit.module( 'Markdown' );
  25. QUnit.test( 'Vertical separator', function( assert ) {
  26. assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
  27. });
  28. QUnit.test( 'Horizontal separator', function( assert ) {
  29. assert.strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' );
  30. });
  31. } );
  32. </script>
  33. </body>
  34. </html>