Skip to content

Commit 35f2adf

Browse files
committed
Fixed API
1 parent d31d460 commit 35f2adf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/highlightjs-lang.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
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) {
@@ -24,7 +24,7 @@
2424
});
2525
}
2626

27-
function lineNumbersBlock (element) {
27+
function initLangBlock (element) {
2828
if (typeof element !== 'object') return;
2929

3030
var classes = element.className.split(' ');

0 commit comments

Comments
 (0)