rocco-obb 0.77 → 0.78
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/lib/rocco.rb +4 -8
- data/rocco.gemspec +1 -1
- metadata +3 -3
data/lib/rocco.rb
CHANGED
|
@@ -108,13 +108,9 @@ class Rocco
|
|
|
108
108
|
elsif @options[:language] != defaults[:language]
|
|
109
109
|
@options[:comment_chars] = generate_comment_chars()
|
|
110
110
|
end
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
else
|
|
115
|
-
@comment_pattern = Regexp.new("^\\s*#{@options[:comment_chars][:single]}\s?")
|
|
116
|
-
end
|
|
117
|
-
|
|
111
|
+
|
|
112
|
+
@comment_pattern = Regexp.new("^\\s*#{@options[:comment_chars][:single]}\s?|\\s*#{@options[:comment_chars][:multi][:start]}(#{@options[:comment_chars][:multi][:middle]})#{@options[:comment_chars][:multi][:end]}")
|
|
113
|
+
puts @comment_pattern.source
|
|
118
114
|
@sections = highlight(split(parse(@data)))
|
|
119
115
|
end
|
|
120
116
|
|
|
@@ -178,7 +174,7 @@ class Rocco
|
|
|
178
174
|
"cpp" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "*/" } },
|
|
179
175
|
"java" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "*/" } },
|
|
180
176
|
"js" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "*/" } },
|
|
181
|
-
"php" => { :single => "
|
|
177
|
+
"php" => { :single => "//", :multi => { :start => "/**", :middle => "*", :end => "*{1,2}/"} },
|
|
182
178
|
"lua" => { :single => "--", :multi => nil },
|
|
183
179
|
"python" => { :single => "#", :multi => { :start => '"""', :middle => nil, :end => '"""' } },
|
|
184
180
|
"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: 151
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
|
-
-
|
|
9
|
-
version: "0.
|
|
8
|
+
- 78
|
|
9
|
+
version: "0.78"
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Ryan Tomayko
|