Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Fix RuboCop warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed Aug 14, 2023
1 parent 8ec56dc commit 7d1b54b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/post_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def content_as_plaintext
# Based on https://stackoverflow.com/a/28449868/57950
doc = Nokogiri::HTML(content)
doc.xpath('//style').remove
doc.xpath('//text()').map(&:text).map(&:strip).join(' ')
doc.xpath('//text()').map { |x| x.text.strip }.join(' ')
end
end

Expand Down

0 comments on commit 7d1b54b

Please sign in to comment.