Skip to content
Browse files

ignore white lines when extracting docs

  • Loading branch information...
1 parent 05e2e4c commit acaeeea709a806eefe0d50dd6bea079bc45044b9 @gnandretta gnandretta committed Jul 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 Rakefile
View
2 Rakefile
@@ -9,7 +9,7 @@ namespace :doc do
Dir.glob 'lib/sinatra/*.rb' do |file|
excluded_files = %w[lib/sinatra/contrib.rb lib/sinatra/capture.rb lib/sinatra/engine_tracking.rb]
next if excluded_files.include?(file)
- doc = File.read(file)[/^module Sinatra\n( #[^\n]*\n)*/m].scan(/^ *#(?!#) ?(.*)\n/).join("\n")
+ doc = File.read(file)[/^module Sinatra(\n)+( #[^\n]*\n)*/m].scan(/^ *#(?!#) ?(.*)\n/).join("\n")
file = "doc/#{file[4..-4].tr("/_", "-")}.rdoc"
Dir.mkdir "doc" unless File.directory? "doc"
puts "writing #{file}"

0 comments on commit acaeeea

Please sign in to comment.
Something went wrong with that request. Please try again.