Fix highlighting bug
This commit is contained in:
		
							parent
							
								
									29651ebfd5
								
							
						
					
					
						commit
						895485e410
					
				
							
								
								
									
										1
									
								
								TODO.md
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								TODO.md
									
									
									
									
									
								
							| @ -5,4 +5,3 @@ | |||||||
| * Add file extensions ourselves to push state | * Add file extensions ourselves to push state | ||||||
| * Better about page text | * Better about page text | ||||||
| * add feedback for errors to UI - esp. too long | * add feedback for errors to UI - esp. too long | ||||||
| * html escape everything |  | ||||||
|  | |||||||
| @ -17,7 +17,8 @@ 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 = { value: res.data, language: null }; |         // failed highlight, fall back on auto
 | ||||||
|  |         high = hljs.highlightAuto(res.data); | ||||||
|       } |       } | ||||||
|       callback({ |       callback({ | ||||||
|         value: high.value, |         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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 John Crepezzi
						John Crepezzi