From 9eafc3e9a2dad4de36d64bd26d2e9f18c2943b98 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 6 Jun 2019 14:50:14 +0000 Subject: 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 --- lib/redmine/wiki_formatting/html_parser.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/redmine/wiki_formatting/html_parser.rb') 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 -- cgit v1.2.3