FIX: Hoisting linebreaks shouldn't fail for HTML5 elements (#14364)

This commit is contained in:
Gerhard Schlager
2021-09-17 10:41:34 +02:00
committed by GitHub
parent 2c7cc40be3
commit 962ccf0ab5
2 changed files with 14 additions and 7 deletions

View File

@ -38,9 +38,9 @@ describe HtmlToMarkdown do
HTML
markdown = <<~MD
Let me see if it happens by answering your message through Thunderbird.
Let me see if it happens by answering your message through Thunderbird.
Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1
Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1 Long sentence 1
MD
expect(html_to_markdown(html)).to eq(markdown.strip)
@ -70,13 +70,15 @@ describe HtmlToMarkdown do
html = <<~HTML
<aside class="quote no-group">
<blockquote>
<p>hello.</p>
<p>Hello,<br>is it me you're looking for?</p>
</blockquote>
<br>
</aside>
HTML
markdown = <<~MD
> hello.
> Hello,
> is it me you're looking for?
MD
expect(html_to_markdown(html)).to eq(markdown.strip)