rocco-obb 0.78 → 0.79
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rocco.rb +4 -2
- data/rocco.gemspec +1 -1
- metadata +3 -3
data/lib/rocco.rb
CHANGED
@@ -109,7 +109,9 @@ class Rocco
|
|
109
109
|
@options[:comment_chars] = generate_comment_chars()
|
110
110
|
end
|
111
111
|
|
112
|
-
|
112
|
+
if(@options[:comment_chars][:regex]) @comment_pattern = Regexp.new(@options[:comment_chars][:regex])
|
113
|
+
else @comment_pattern = Regexp.new("^\\s*#{@options[:comment_chars]}\s?")
|
114
|
+
|
113
115
|
puts @comment_pattern.source
|
114
116
|
@sections = highlight(split(parse(@data)))
|
115
117
|
end
|
@@ -174,7 +176,7 @@ class Rocco
|
|
174
176
|
"cpp" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "*/" } },
|
175
177
|
"java" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "*/" } },
|
176
178
|
"js" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "*/" } },
|
177
|
-
"php" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "
|
179
|
+
"php" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "*/"}, :regex => "#//(.*)|(?:\*+\n)(?m:(.*?))\*+/#" },
|
178
180
|
"lua" => { :single => "--", :multi => nil },
|
179
181
|
"python" => { :single => "#", :multi => { :start => '"""', :middle => nil, :end => '"""' } },
|
180
182
|
"ruby" => { :single => "#", :multi => nil },
|
data/rocco.gemspec
CHANGED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocco-obb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 149
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 79
|
9
|
+
version: "0.79"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ryan Tomayko
|