Really support extension-less files (and still support -o)
This commit is contained in:
parent
889fcb286b
commit
6aa7bd6a33
@ -88,7 +88,7 @@ end
|
||||
# Run each file through Rocco and write output.
|
||||
sources.each do |filename|
|
||||
rocco = Rocco.new(filename, sources, options)
|
||||
dest = File.join(output_dir, filename.split('.')[0..-2].join('.') + '.html')
|
||||
dest = File.join(output_dir, (filename.split('.')[0..-2].empty? ? filename : filename.split('.')[0..-2].join('.')) + '.html')
|
||||
puts "rocco: #{filename} -> #{dest}"
|
||||
FileUtils.mkdir_p File.dirname(dest)
|
||||
File.open(dest, 'wb') { |fd| fd.write(rocco.to_html) }
|
||||
|
Loading…
Reference in New Issue
Block a user