avoid errors in old ie from code highlighting
This commit is contained in:
		| @@ -1,6 +1,11 @@ | ||||
| // START CUSTOM REVEAL.JS INTEGRATION | ||||
| (function() { | ||||
| 	[].slice.call( document.querySelectorAll( 'pre code' ) ).forEach( function( element ) { | ||||
| 	if( typeof window.addEventListener === 'function' ) { | ||||
| 		var hljs_nodes = document.querySelectorAll( 'pre code' ); | ||||
|  | ||||
| 		for( var i = 0, len = hljs_nodes.length; i < len; i++ ) { | ||||
| 			var element = hljs_nodes[i]; | ||||
|  | ||||
| 			// trim whitespace if data-trim attribute is present | ||||
| 			if( element.hasAttribute( 'data-trim' ) && typeof element.innerHTML.trim === 'function' ) { | ||||
| 				element.innerHTML = element.innerHTML.trim(); | ||||
| @@ -10,7 +15,8 @@ | ||||
| 			element.addEventListener( 'focusout', function( event ) { | ||||
| 				hljs.highlightBlock( event.currentTarget ); | ||||
| 			}, false ); | ||||
| 	} ); | ||||
| 		} | ||||
| 	} | ||||
| })(); | ||||
| // END CUSTOM REVEAL.JS INTEGRATION | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user