Module: HtmlWhitespaceCleaner
- Defined in:
- lib/html_whitespace_cleaner.rb,
lib/html_whitespace_cleaner/version.rb
Overview
This module contains the public interface #clean and some private methods used within it.
Constant Summary collapse
- VERSION =
"1.0.1"
Class Method Summary collapse
-
.clean(html_string) ⇒ Object
Takes a string of html code and returns the same code but with extra whitespace removed.
Class Method Details
.clean(html_string) ⇒ Object
Takes a string of html code and returns the same code but with extra whitespace removed.
It only removes whitespace between html tags. Formatting within tags is preserved.
15 16 17 |
# File 'lib/html_whitespace_cleaner.rb', line 15 def self.clean(html_string) (condense_whitespace(html_string)).strip end |