summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting/html_parser.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-06-06 14:50:14 +0000
committerGo MAEDA <maeda@farend.jp>2019-06-06 14:50:14 +0000
commit9eafc3e9a2dad4de36d64bd26d2e9f18c2943b98 (patch)
tree0e1351d51bbb2e4e688bcc6d12d97fb672a0d09d /lib/redmine/wiki_formatting/html_parser.rb
parent2e0ec5b0e66d288a476d79b2163a316dbbed0f8c (diff)
downloadredmine-9eafc3e9a2dad4de36d64bd26d2e9f18c2943b98.tar.gz
redmine-9eafc3e9a2dad4de36d64bd26d2e9f18c2943b98.zip
Remove trailing whitespaces from lib (#31506).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18231 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting/html_parser.rb')
-rw-r--r--lib/redmine/wiki_formatting/html_parser.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redmine/wiki_formatting/html_parser.rb b/lib/redmine/wiki_formatting/html_parser.rb
index be01ca339..aa4891ce0 100644
--- a/lib/redmine/wiki_formatting/html_parser.rb
+++ b/lib/redmine/wiki_formatting/html_parser.rb
@@ -31,11 +31,11 @@ module Redmine
def self.to_text(html)
html = html.gsub(/[\n\r]/, '').squeeze(' ')
-
+
doc = Loofah.document(html)
doc.scrub!(WikiTags.new(tags))
doc.scrub!(:newline_block_elements)
-
+
Loofah.remove_extraneous_whitespace(doc.text).strip
end
@@ -44,7 +44,7 @@ module Redmine
@direction = :bottom_up
@tags_to_text = tags_to_text || {}
end
-
+
def scrub(node)
formatting = @tags_to_text[node.name]
case formatting