rack-codehighlighter 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +22 -0
- data/VERSION.yml +2 -1
- data/lib/rack/codehighlighter.rb +2 -2
- metadata +3 -2
data/LICENSE
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2009, 2010 Wlodek Bzyl
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/VERSION.yml
CHANGED
data/lib/rack/codehighlighter.rb
CHANGED
@@ -13,7 +13,7 @@ module Rack
|
|
13
13
|
@highlighter = highlighter
|
14
14
|
@opts = {
|
15
15
|
:element => "pre",
|
16
|
-
:pattern => /\A:::(\w+)\s
|
16
|
+
:pattern => /\A:::(\w+)\s*(\n|
)/i, # 
 == line feed
|
17
17
|
:reason => "[[-- ugly code removed --]]", #8-)
|
18
18
|
:markdown => false
|
19
19
|
}
|
@@ -145,7 +145,7 @@ module Rack
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def unescape_html(string)
|
148
|
-
string.to_s.gsub("<", '<').gsub(">", '>').gsub("&", '&')
|
148
|
+
string.to_s.gsub(/
/i, "\n").gsub("<", '<').gsub(">", '>').gsub("&", '&')
|
149
149
|
end
|
150
150
|
|
151
151
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-codehighlighter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wlodek Bzyl
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-05 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -51,6 +51,7 @@ extensions: []
|
|
51
51
|
extra_rdoc_files:
|
52
52
|
- LICENSE
|
53
53
|
- README.markdown
|
54
|
+
- TODO
|
54
55
|
files:
|
55
56
|
- LICENSE
|
56
57
|
- Rakefile
|