Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing bugs that popped up as soon as I ran `rake`

  • Loading branch information...
commit cffe49a813bbc083c695997c5d2a7da7f3cf99a1 1 parent 1262d50
@mikewest mikewest authored
Showing with 4 additions and 4 deletions.
  1. +3 −3 Rakefile
  2. +1 −1  lib/rocco.rb
View
6 Rakefile
@@ -30,12 +30,12 @@ directory 'docs/'
desc 'Build docs and open in browser for the reading'
task :read => :docs do
- sh 'open docs/rocco.html'
+ sh 'open docs/lib/rocco.html'
end
# Make index.html a copy of rocco.html
-file 'docs/index.html' => 'docs/rocco.html' do |f|
- cp 'docs/rocco.html', 'docs/index.html', :preserve => true
+file 'docs/index.html' => 'docs/lib/rocco.html' do |f|
+ cp 'docs/lib/rocco.html', 'docs/index.html', :preserve => true
end
task :docs => 'docs/index.html'
CLEAN.include 'docs/index.html'
View
2  lib/rocco.rb
@@ -310,7 +310,7 @@ def parse(data)
# `def func():\n print "omg!"`
def normalize_leading_spaces( sections )
sections.map do |section|
- if section[ 0 ]
+ if section.any? && section[0].any?
leading_space = section[0][0].match( "^\s+" )
if leading_space
section[0] = section[0].map{ |line| line.sub( /^#{leading_space.to_s}/, '' ) }
Please sign in to comment.
Something went wrong with that request. Please try again.