peek-rblineprof 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -5,3 +5,7 @@
5
5
  # 0.1.1
6
6
 
7
7
  - Fix CSS for modal where it would be anchored to the bottom of the page.
8
+
9
+ # 0.1.2
10
+
11
+ - Fixed an issue where non pygmentized code blocks would not be formatted properly. #1
@@ -1,5 +1,5 @@
1
1
  module Peek
2
2
  module Rblineprof
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
@@ -4,6 +4,8 @@ rescue LoadError
4
4
  # Doesn't have pygments.rb installed
5
5
  end
6
6
 
7
+ require 'rack/utils'
8
+
7
9
  module Peek
8
10
  module Rblineprof
9
11
  module ControllerHelpers
@@ -23,7 +25,7 @@ module Peek
23
25
  if pygmentize? && lexer.present?
24
26
  Pygments.highlight(code, :lexer => lexer_for_filename(file_name))
25
27
  else
26
- code
28
+ "<pre>#{Rack::Utils.escape_html(code)}</pre>"
27
29
  end
28
30
  end
29
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peek-rblineprof
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-11 00:00:00.000000000 Z
12
+ date: 2013-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: peek