Commit d16a3cf7 authored by Rémy Coutable's avatar Rémy Coutable

Fix replacement of Pygments with Rouge

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent da3ad00c
import 'vendor/peek'; import 'vendor/peek';
import 'vendor/peek.performance_bar'; import 'vendor/peek.performance_bar';
import 'vendor/peek.rblineprof';
(function() { (function() {
$(document).on('click', '#peek-show-queries', function(e) { $(document).on('click', '#peek-show-queries', function(e) {
console.log('peek!');
var $modal; var $modal;
$('.peek-rblineprof-modal').hide();
$modal = $('#modal-peek-pg-queries'); $modal = $('#modal-peek-pg-queries');
if ($modal.length) { if ($modal.length) {
$modal.modal('toggle'); $modal.modal('toggle');
} }
return e.preventDefault(); return e.preventDefault();
}); });
$(document).on('click', '.js-lineprof-file', function(e) {
$(this).parents('.heading').next('div').toggle();
return e.preventDefault();
});
}).call(window); }).call(window);
...@@ -77,7 +77,7 @@ module Peek ...@@ -77,7 +77,7 @@ module Peek
output << "<pre class='duration'>#{times.join("\n")}</pre>" output << "<pre class='duration'>#{times.join("\n")}</pre>"
# The following line was changed from # The following line was changed from
# https://github.com/peek/peek-rblineprof/blob/8d3b7a283a27de2f40abda45974516693d882258/lib/peek/rblineprof/controller_helpers.rb#L125 # 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 output << "</div></div>" # .data then .peek-rblineprof-file
end end
......
$(document).on('click', '.js-lineprof-file', function(e) {
$(this).parents('.heading').next('div').toggle();
e.preventDefault();
return false;
});
//= require peek/views/performance_bar //= require peek/views/performance_bar
//= require peek/views/rblineprof //= require peek/views/rblineprof
//= require peek/views/rblineprof/pygments
#peek { #peek {
background: #000; background: #000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment