mirror of
https://github.com/filp/whoops.git
synced 2026-09-11 18:26:22 +00:00
Merge pull request #758 from garygreen/highlight-speed
Speed up syntax highlighting
This commit is contained in:
@@ -25,7 +25,7 @@ Zepto(function($) {
|
||||
* highlight the current line
|
||||
*/
|
||||
var renderCurrentCodeblock = function(id) {
|
||||
Prism.highlightAll();
|
||||
Prism.highlightAllUnder(document.querySelector('.frame-code-container .frame-code.active'));
|
||||
highlightCurrentLine();
|
||||
}
|
||||
|
||||
@@ -153,9 +153,6 @@ Zepto(function($) {
|
||||
}
|
||||
});
|
||||
|
||||
// Render late enough for highlightCurrentLine to be ready
|
||||
renderCurrentCodeblock();
|
||||
|
||||
// Avoid to quit the page with some protocol (e.g. IntelliJ Platform REST API)
|
||||
$ajaxEditors.on('click', function(e){
|
||||
e.preventDefault();
|
||||
@@ -185,4 +182,7 @@ Zepto(function($) {
|
||||
e.preventDefault();
|
||||
setActiveFramesTab($(this));
|
||||
});
|
||||
|
||||
// Render late enough for highlightCurrentLine to be ready
|
||||
renderCurrentCodeblock();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user