From b451de0d6de4df6bc66b274cec73b919f823d5ae Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 14 Aug 2010 02:13:00 -0300 Subject: Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) --- railties/guides/rails_guides/generator.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'railties/guides/rails_guides/generator.rb') diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb index bb7cdb6756..5a5ce54503 100644 --- a/railties/guides/rails_guides/generator.rb +++ b/railties/guides/rails_guides/generator.rb @@ -32,7 +32,7 @@ # # Separate many using commas: # -# # generates only +# # generates only # ONLY=assoc,migrations ruby rails_guides.rb # # Note that if you are working on a guide generation will by default process @@ -77,7 +77,7 @@ module RailsGuides def initialize_dirs(output) @guides_dir = File.join(File.dirname(__FILE__), '..') @source_dir = File.join(@guides_dir, "source") - @output_dir = output || File.join(@guides_dir, "output") + @output_dir = output || File.join(@guides_dir, "output") end def create_output_dir_if_needed @@ -116,7 +116,7 @@ module RailsGuides def output_file_for(guide) guide.sub(GUIDES_RE, '.html') end - + def generate?(source_file, output_file) fin = File.join(source_dir, source_file) fout = File.join(output_dir, output_file) @@ -213,9 +213,9 @@ module RailsGuides code_blocks << %{
#{es}
} "\ndirty_workaround_for_notextile_#{code_blocks.size - 1}\n" end - + body = yield body - + body.gsub(%r{

dirty_workaround_for_notextile_(\d+)

}) do |_| code_blocks[$1.to_i] end @@ -225,7 +225,7 @@ module RailsGuides anchors = extract_anchors(html) check_fragment_identifiers(html, anchors) end - + def extract_anchors(html) # Textile generates headers with IDs computed from titles. anchors = Set.new @@ -241,7 +241,7 @@ module RailsGuides anchors += Set.new(html.scan(/