Fix replacement of Pygments with Rouge

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2017-06-07 16:51:15 +02:00
parent da3ad00cf1
commit d16a3cf7fc
4 changed files with 7 additions and 9 deletions

View File

@ -1,15 +1,19 @@
import 'vendor/peek';
import 'vendor/peek.performance_bar';
import 'vendor/peek.rblineprof';
(function() {
$(document).on('click', '#peek-show-queries', function(e) {
console.log('peek!');
var $modal;
$('.peek-rblineprof-modal').hide();
$modal = $('#modal-peek-pg-queries');
if ($modal.length) {
$modal.modal('toggle');
}
return e.preventDefault();
});
$(document).on('click', '.js-lineprof-file', function(e) {
$(this).parents('.heading').next('div').toggle();
return e.preventDefault();
});
}).call(window);

View File

@ -77,7 +77,7 @@ module Peek
output << "<pre class='duration'>#{times.join("\n")}</pre>"
# The following line was changed from
# https://github.com/peek/peek-rblineprof/blob/8d3b7a283a27de2f40abda45974516693d882258/lib/peek/rblineprof/controller_helpers.rb#L125
output << "<pre class='code highlight'>#{pygmentize(file_name, code.join, 'ruby')}</pre>"
output << "<pre class='code highlight white'>#{pygmentize(file_name, code.join, 'ruby')}</pre>"
output << "</div></div>" # .data then .peek-rblineprof-file
end

View File

@ -1,5 +0,0 @@
$(document).on('click', '.js-lineprof-file', function(e) {
$(this).parents('.heading').next('div').toggle();
e.preventDefault();
return false;
});

View File

@ -1,6 +1,5 @@
//= require peek/views/performance_bar
//= require peek/views/rblineprof
//= require peek/views/rblineprof/pygments
#peek {
background: #000;