hanna-bootstrap 0.0.2 → 0.0.3
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/hanna-bootstrap.rb +3 -2
- data/lib/hanna-bootstrap/version.rb +1 -1
- metadata +1 -1
data/lib/hanna-bootstrap.rb
CHANGED
@@ -376,9 +376,10 @@ class RDoc::Generator::Bootstrap
|
|
376
376
|
indent = src.length
|
377
377
|
lines = src.lines.to_a
|
378
378
|
start = 0
|
379
|
+
line_numbers = @options.line_numbers
|
379
380
|
if src =~ /\A.*#\ *File/i # remove '# File' comment
|
380
381
|
line = lines.shift
|
381
|
-
line.sub!(/\A(.*)(, line (\d+))/, '\1')
|
382
|
+
line_numbers = false unless line.sub!(/\A(.*)(, line (\d+))/, '\1')
|
382
383
|
start = $3.to_i
|
383
384
|
end
|
384
385
|
lines.each do |line|
|
@@ -392,7 +393,7 @@ class RDoc::Generator::Bootstrap
|
|
392
393
|
src.gsub!(/^#{' ' * indent}/, '') if indent > 0
|
393
394
|
|
394
395
|
CodeRay.highlight(src, lang,
|
395
|
-
:line_numbers =>
|
396
|
+
:line_numbers => line_numbers ? :table : nil,
|
396
397
|
:line_number_anchors => "#{method.aref}-source-",
|
397
398
|
:line_number_start => start
|
398
399
|
)
|