فهرست منبع

Merge branch 'dev' of github.com:hakimel/reveal.js

Hakim El Hattab 3 سال پیش
والد
کامیت
b18f12d964
4فایلهای تغییر یافته به همراه14 افزوده شده و 1 حذف شده
  1. 0 0
      plugin/highlight/highlight.esm.js
  2. 0 0
      plugin/highlight/highlight.js
  3. 1 1
      plugin/highlight/plugin.js
  4. 13 0
      test/test-markdown.html

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
plugin/highlight/highlight.esm.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
plugin/highlight/highlight.js


+ 1 - 1
plugin/highlight/plugin.js

@@ -35,7 +35,7 @@ const Plugin = {
 
 
 		Array.from( reveal.getRevealElement().querySelectorAll( 'pre code' ) ).forEach( block => {
 		Array.from( reveal.getRevealElement().querySelectorAll( 'pre code' ) ).forEach( block => {
 
 
-			block.parentNode.className = 'code-wrapper';
+			block.parentNode.classList.add('code-wrapper');
 
 
 			// Code can optionally be wrapped in script template to avoid
 			// Code can optionally be wrapped in script template to avoid
 			// HTML being parsed by the browser (i.e. when you need to
 			// HTML being parsed by the browser (i.e. when you need to

+ 13 - 0
test/test-markdown.html

@@ -281,6 +281,15 @@
 						```
 						```
 					</script>
 					</script>
 				</section>
 				</section>
+				<section data-markdown class="with-code-in-fragment">
+					<script type="text/template">
+					```js
+					foo.bar();
+					```
+
+					<!-- .element: class="fragment" -->
+					</script>
+				</section>
 			</div>
 			</div>
 		</div>
 		</div>
 
 
@@ -452,6 +461,10 @@
 				QUnit.test( '```javascript [1,2,3] enables line highlights and sets language', function( assert ) {
 				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 );
 					assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-line-highlights-and-lanugage .hljs.javascript[data-line-numbers="1,2,3"]' ).length, 1 );
 				});
 				});
+				
+				QUnit.test( '```block should allow custom fragment', function( assert ) {
+					assert.strictEqual( deck6.getRevealElement().querySelectorAll( '.with-code-in-fragment pre.fragment' ).length, 1 );
+				});
 
 
 			} );
 			} );
 
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است