v0.1.17: don't crash when no callback is given (one more case)

parent 7a18f6a3
......@@ -622,9 +622,8 @@ function highlightClean(func, callback, start) {
return highlightClean(str, callback);
} else if (cls == '__reset__arguments__') {
macroargs = [];
return callback(
span.replace('class="' + cls + '"', 'class="whitespace"'),
'whitespace', str);
span = span.replace('class="' + cls + '"', 'class="whitespace"');
cls = 'whitespace';
} else if (cls == 'argument') {
macroargs.push(str);
} else if (macroargs.indexOf(str) >= 0) {
......
{
"name": "clean-highlighter",
"version": "0.1.16",
"version": "0.1.17",
"description": "Clean language highlighter",
"keywords": ["clean","highlighter"],
"main": "clean.js",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment