Added callback to static highlighter
This commit is contained in:
parent
0bebd94926
commit
e8bb1e38e7
1 changed files with 2 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {
|
|||
|
||||
|
||||
|
||||
exports.highlight = function(el, opts) {
|
||||
exports.highlight = function(el, opts, callback) {
|
||||
var m = el.className.match(/lang-(\w+)/);
|
||||
var mode = opts.mode || m && ("ace/mode/" + m[1]);
|
||||
if (!mode)
|
||||
|
|
@ -174,6 +174,7 @@ exports.highlight = function(el, opts) {
|
|||
var lineEl = container.children[pos.row];
|
||||
lineEl && lineEl.appendChild(nodes[i+1]);
|
||||
}
|
||||
callback && callback();
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue