update reveal.js
This commit is contained in:
@@ -274,6 +274,13 @@
|
||||
```
|
||||
</script>
|
||||
</section>
|
||||
<section data-markdown class="with-offset">
|
||||
<script type="text/template">
|
||||
```[123:]
|
||||
code
|
||||
```
|
||||
</script>
|
||||
</section>
|
||||
<section data-markdown class="with-line-highlights-and-lanugage">
|
||||
<script type="text/template">
|
||||
```javascript [1,2,3]
|
||||
@@ -281,6 +288,20 @@
|
||||
```
|
||||
</script>
|
||||
</section>
|
||||
<section data-markdown class="with-line-highlights-offset-and-lanugage">
|
||||
<script type="text/template">
|
||||
```javascript [456: 3,4,5]
|
||||
code
|
||||
```
|
||||
</script>
|
||||
</section>
|
||||
<section data-markdown class="with-line-offset-and-lanugage">
|
||||
<script type="text/template">
|
||||
```javascript [756:]
|
||||
code
|
||||
```
|
||||
</script>
|
||||
</section>
|
||||
<section data-markdown class="with-code-in-fragment">
|
||||
<script type="text/template">
|
||||
```js
|
||||
@@ -298,6 +319,8 @@
|
||||
import Markdown from '../plugin/markdown/markdown.esm.js'
|
||||
import Highlight from '../plugin/highlight/highlight.esm.js'
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
|
||||
let deck1 = new Reveal( document.querySelector( '.deck1' ), { plugins: [ Markdown ] })
|
||||
deck1.addEventListener( 'ready', function() {
|
||||
|
||||
@@ -458,9 +481,22 @@
|
||||
assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-line-highlights .hljs[data-line-numbers="1,2,3"]' ).length, 1 );
|
||||
});
|
||||
|
||||
QUnit.test( '```[234: ] line offset only', function( assert ) {
|
||||
assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-offset .hljs[data-ln-start-from="123"]' ).length, 1 );
|
||||
});
|
||||
|
||||
QUnit.test( '```javascript [1,2,3] enables line highlights and sets language', function( assert ) {
|
||||
assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-line-highlights-and-lanugage .hljs.javascript[data-line-numbers="1,2,3"]' ).length, 1 );
|
||||
});
|
||||
|
||||
QUnit.test( '```javascript [123: 3,4,5] add line offset and enables line highlights and sets language', function( assert ) {
|
||||
assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-line-highlights-offset-and-lanugage .hljs.javascript[data-line-numbers="3,4,5"]' ).length, 1 );
|
||||
assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-line-highlights-offset-and-lanugage .hljs.javascript[data-ln-start-from="456"]' ).length, 1 );
|
||||
});
|
||||
|
||||
QUnit.test( '```javascript [756:] add line offset and sets no line highlights and sets language', function( assert ) {
|
||||
assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-line-offset-and-lanugage .hljs.javascript[data-ln-start-from="756"]' ).length, 1 );
|
||||
});
|
||||
|
||||
QUnit.test( '```block should allow custom fragment', function( assert ) {
|
||||
assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-code-in-fragment pre.fragment' ).length, 1 );
|
||||
|
||||
Reference in New Issue
Block a user