1
0
Fork 0
mirror of https://github.com/seejohnrun/haste-server.git synced 2024-11-22 04:31:21 +00:00

Fix highlighting bug

This commit is contained in:
John Crepezzi 2011-11-28 00:54:24 -05:00
parent 29651ebfd5
commit 895485e410
3 changed files with 3 additions and 3 deletions

View file

@ -5,4 +5,3 @@
* Add file extensions ourselves to push state
* Better about page text
* add feedback for errors to UI - esp. too long
* html escape everything

View file

@ -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,

File diff suppressed because one or more lines are too long