mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Make rubocop happy again.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user