1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-11-01 01:30:21 +01:00

on highlight error, return data

This commit is contained in:
John Crepezzi 2011-11-23 16:58:56 -05:00
parent 6285d665ad
commit 8281d382e4

View file

@ -17,7 +17,7 @@ haste_document.prototype.load = function(key, callback, lang) {
try {
var high = lang ? hljs.highlight(lang, res.data) : hljs.highlightAuto(res.data);
} catch(err) {
high = hljs.highlightAuto(res.data);
high = { value: res.data, language: null };
}
callback({
value: high.value,