Permalink
Browse files

fixes generation of index and credits page

  • Loading branch information...
1 parent 836b778 commit 50be5f039b310b61991c5e1de2b52c32564227b3 @fxn fxn committed Sep 2, 2009
@@ -18,7 +18,7 @@ def initialize(output = nil)
end
def generate
- guides = Dir.entries(view_path).find_all {|g| g =~ /textile$/ }
+ guides = Dir.entries(view_path).find_all {|g| g =~ /\.textile(?:\.erb)?$/ }
if ENV["ONLY"]
only = ENV["ONLY"].split(",").map{|x| x.strip }.map {|o| "#{o}.textile" }
@@ -36,7 +36,7 @@ def generate
end
def generate_guide(guide)
- guide =~ /(.*?)(\.erb)?\.textile/
+ guide =~ /(.*?)\.textile(?:\.erb)?$/
name = $1
puts "Generating #{name}"
@@ -46,7 +46,7 @@ def generate_guide(guide)
@view = ActionView::Base.new(view_path)
@view.extend(Helpers)
- if guide =~ /\.erb\.textile/
+ if guide =~ /\.textile\.erb$/
# Generate the erb pages with textile formatting - e.g. index/authors
result = view.render(:layout => 'layout', :file => guide)
f.write textile(result)

0 comments on commit 50be5f0

Please sign in to comment.