Commit 6d7bf167 authored by Lucas Nussbaum's avatar Lucas Nussbaum
Browse files

wikigen: add some context when diffing

parent ac963f29
...@@ -68,7 +68,7 @@ class WikiGenerator ...@@ -68,7 +68,7 @@ class WikiGenerator
def diff_page() def diff_page()
wiki_content = remove_page_creation_date(@mw_client.get_page_content(@page_name)).strip # .strip removes potential '\n' at end of file wiki_content = remove_page_creation_date(@mw_client.get_page_content(@page_name)).strip # .strip removes potential '\n' at end of file
generated_content = remove_page_creation_date(@generated_content).strip generated_content = remove_page_creation_date(@generated_content).strip
diff = Diffy::Diff.new(wiki_content, generated_content, :context => 0) diff = Diffy::Diff.new(wiki_content, generated_content, :context => 3)
if (diff.to_s.empty?) if (diff.to_s.empty?)
puts "No differences found between generated and current wiki content for page #{@page_name}." puts "No differences found between generated and current wiki content for page #{@page_name}."
return true return true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment