Kill trailing whitespace in ruby files

This commit is contained in:
小太
2013-03-19 23:10:10 +11:00
parent c107f96cec
commit cba839ba76
319 changed files with 2710 additions and 2710 deletions

View File

@@ -1,26 +1,26 @@
class WikiPagePresenter
attr_reader :wiki_page
def initialize(wiki_page)
@wiki_page = wiki_page
end
def excerpt
wiki_page.body
end
def blurb
excerpt.try(:gsub, /<.+?>/, "")
end
def consequent_tag_aliases
@consequent_tag_aliases ||= TagAlias.where("consequent_name = ?", wiki_page.title)
end
def antecedent_tag_alias
@antecedent_tag_alias ||= TagAlias.find_by_antecedent_name(wiki_page.title)
end
# Produce a formatted page that shows the difference between two versions of a page.
def diff(other_version)
pattern = Regexp.new('(?:<.+?>)|(?:[0-9_A-Za-z\x80-\xff]+[\x09\x20]?)|(?:[ \t]+)|(?:\r?\n)|(?:.+?)')