Fix highlighting bug
This commit is contained in:
parent
29651ebfd5
commit
895485e410
3 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,8 @@ haste_document.prototype.load = function(key, callback, lang) {
|
|||
try {
|
||||
var high = lang ? hljs.highlight(lang, res.data) : hljs.highlightAuto(res.data);
|
||||
} catch(err) {
|
||||
high = { value: res.data, language: null };
|
||||
// failed highlight, fall back on auto
|
||||
high = hljs.highlightAuto(res.data);
|
||||
}
|
||||
callback({
|
||||
value: high.value,
|
||||
|
|
2
static/application.min.js
vendored
2
static/application.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue