loofah
loofah copied to clipboard
[RubyConf] Create scrubber for replacing double breakpoints into paragraph nodes
Why?
- Users would like to have functionality within loofah that provides the ability to replace double breakpoints into paragraph nodes
What?
- Creating a new scrubber (
:double_breakpoint
) that replaces double breakpoints into paragraph nodes (thank you @flavorjones )
How did we test?
- Created a new integration test case.
[!IMPORTANT]
There is a failing test right now where the expectation and actual result match except for newline characters. In discussing with @flavorjones, this might be related to minitest and how it formats html
(ruby) doc.xpath("/html/body").inner_html
"<p>Some text here in a logical paragraph.</p><p>Some more text, apparently a second paragraph.</p><p>Et cetera...</p>"
(ruby) BREAKPOINT_RESULT
"<p>Some text here in a logical paragraph.</p><p>Some more text, apparently a second paragraph.</p><p>Et cetera...</p>"
(ruby) BREAKPOINT_RESULT == doc.xpath("/html/body").inner_html
References #279