Added callback to static highlighter

This commit is contained in:
Zef Hemel 2013-10-28 11:33:51 +01:00
commit e8bb1e38e7

View file

@ -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();
});
};
});