Skip to content

Commit d16a3cf

Browse files
committed
Fix replacement of Pygments with Rouge
Signed-off-by: Rémy Coutable <[email protected]>
1 parent da3ad00 commit d16a3cf

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

app/assets/javascripts/peek.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import 'vendor/peek';
22
import 'vendor/peek.performance_bar';
3-
import 'vendor/peek.rblineprof';
43

54
(function() {
65
$(document).on('click', '#peek-show-queries', function(e) {
7-
console.log('peek!');
86
var $modal;
7+
$('.peek-rblineprof-modal').hide();
98
$modal = $('#modal-peek-pg-queries');
109
if ($modal.length) {
1110
$modal.modal('toggle');
1211
}
1312
return e.preventDefault();
1413
});
14+
15+
$(document).on('click', '.js-lineprof-file', function(e) {
16+
$(this).parents('.heading').next('div').toggle();
17+
return e.preventDefault();
18+
});
1519
}).call(window);

lib/peek/rblineprof/custom_controller_helpers.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def inject_rblineprof
7777
output << "<pre class='duration'>#{times.join("\n")}</pre>"
7878
# The following line was changed from
7979
# https://github.com/peek/peek-rblineprof/blob/8d3b7a283a27de2f40abda45974516693d882258/lib/peek/rblineprof/controller_helpers.rb#L125
80-
output << "<pre class='code highlight'>#{pygmentize(file_name, code.join, 'ruby')}</pre>"
80+
output << "<pre class='code highlight white'>#{pygmentize(file_name, code.join, 'ruby')}</pre>"
8181
output << "</div></div>" # .data then .peek-rblineprof-file
8282
end
8383

vendor/assets/javascripts/peek.rblineprof.js

-5
This file was deleted.

vendor/assets/stylesheets/peek.scss

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//= require peek/views/performance_bar
22
//= require peek/views/rblineprof
3-
//= require peek/views/rblineprof/pygments
43

54
#peek {
65
background: #000;

0 commit comments

Comments
 (0)