Make rubocop happy again.

This commit is contained in:
Guo Xiang Tan
2018-06-07 13:28:18 +08:00
parent c6c1ef71c1
commit ad5082d969
79 changed files with 3155 additions and 3155 deletions

View File

@@ -224,14 +224,14 @@ module FlagQuery
private
def self.excerpt(cooked)
excerpt = Post.excerpt(cooked, 200, keep_emoji_images: true)
# remove the first link if it's the first node
fragment = Nokogiri::HTML.fragment(excerpt)
if fragment.children.first == fragment.css("a:first").first && fragment.children.first
fragment.children.first.remove
end
fragment.to_html.strip
def self.excerpt(cooked)
excerpt = Post.excerpt(cooked, 200, keep_emoji_images: true)
# remove the first link if it's the first node
fragment = Nokogiri::HTML.fragment(excerpt)
if fragment.children.first == fragment.css("a:first").first && fragment.children.first
fragment.children.first.remove
end
fragment.to_html.strip
end
end