File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 44 if ( typeof w . hljs === 'undefined' ) {
55 console . error ( 'highlight.js not detected!' ) ;
66 } else {
7- w . hljs . initLineNumbersOnLoad = initLineNumbersOnLoad ;
8- w . hljs . lineNumbersBlock = lineNumbersBlock ;
7+ w . hljs . initLangOnLoad = initLangOnLoad ;
8+ w . hljs . initLangBlock = initLangBlock ;
99 }
1010
11- function initLineNumbersOnLoad ( ) {
11+ function initLangOnLoad ( ) {
1212 w . addEventListener ( 'load' , function ( ) {
1313 try {
1414 var blocks = document . querySelectorAll ( 'code.hljs' ) ;
1515
1616 for ( var i in blocks ) {
1717 if ( blocks . hasOwnProperty ( i ) ) {
18- lineNumbersBlock ( blocks [ i ] ) ;
18+ initLangBlock ( blocks [ i ] ) ;
1919 }
2020 }
2121 } catch ( e ) {
2424 } ) ;
2525 }
2626
27- function lineNumbersBlock ( element ) {
27+ function initLangBlock ( element ) {
2828 if ( typeof element !== 'object' ) return ;
2929
3030 var classes = element . className . split ( ' ' ) ;
You can’t perform that action at this time.
0 commit comments