Permalink
Browse files

corrected diff generation bugs

  • Loading branch information...
1 parent 65625af commit 38d2969d0ca1ada81ef27405f93872438072f554 @ddfreyne ddfreyne committed Jan 17, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/nanoc/cli/commands/compile.rb
@@ -96,10 +96,9 @@ def setup_notifications
end
Nanoc::NotificationCenter.on(:rep_written) do |rep, path, is_created, is_modified|
if !rep.binary? && self.site.config[:enable_output_diff]
- old_contents = old_contents[rep]
new_contents = File.file?(path) ? File.read(path) : nil
- if old_contents && new_contents
- generate_diff_for(rep, old_contents, new_contents)
+ if old_contents[rep] && new_contents
+ generate_diff_for(rep, old_contents[rep], new_contents)
end
end
end

0 comments on commit 38d2969

Please sign in to comment.