mirror of
https://github.com/SunRed/haste-server.git
synced 2024-11-23 17:50:19 +01:00
on highlight error, return data
This commit is contained in:
parent
6285d665ad
commit
8281d382e4
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ haste_document.prototype.load = function(key, callback, lang) {
|
||||||
try {
|
try {
|
||||||
var high = lang ? hljs.highlight(lang, res.data) : hljs.highlightAuto(res.data);
|
var high = lang ? hljs.highlight(lang, res.data) : hljs.highlightAuto(res.data);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
high = hljs.highlightAuto(res.data);
|
high = { value: res.data, language: null };
|
||||||
}
|
}
|
||||||
callback({
|
callback({
|
||||||
value: high.value,
|
value: high.value,
|
||||||
|
|
Loading…
Reference in a new issue