loofah icon indicating copy to clipboard operation
loofah copied to clipboard

[RubyConf] Create scrubber for replacing double breakpoints into paragraph nodes

Open josecolella opened this issue 9 months ago • 4 comments

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

josecolella avatar May 08 '24 16:05 josecolella