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 4
4
if ( typeof w . hljs === 'undefined' ) {
5
5
console . error ( 'highlight.js not detected!' ) ;
6
6
} else {
7
- w . hljs . initLineNumbersOnLoad = initLineNumbersOnLoad ;
8
- w . hljs . lineNumbersBlock = lineNumbersBlock ;
7
+ w . hljs . initLangOnLoad = initLangOnLoad ;
8
+ w . hljs . initLangBlock = initLangBlock ;
9
9
}
10
10
11
- function initLineNumbersOnLoad ( ) {
11
+ function initLangOnLoad ( ) {
12
12
w . addEventListener ( 'load' , function ( ) {
13
13
try {
14
14
var blocks = document . querySelectorAll ( 'code.hljs' ) ;
15
15
16
16
for ( var i in blocks ) {
17
17
if ( blocks . hasOwnProperty ( i ) ) {
18
- lineNumbersBlock ( blocks [ i ] ) ;
18
+ initLangBlock ( blocks [ i ] ) ;
19
19
}
20
20
}
21
21
} catch ( e ) {
24
24
} ) ;
25
25
}
26
26
27
- function lineNumbersBlock ( element ) {
27
+ function initLangBlock ( element ) {
28
28
if ( typeof element !== 'object' ) return ;
29
29
30
30
var classes = element . className . split ( ' ' ) ;
You can’t perform that action at this time.
0 commit comments