FIX: supports bare <li> when converting html to markdown

This commit is contained in:
Régis Hanol
2017-05-17 15:05:11 +02:00
parent 92036616db
commit a1b8a3b52b
2 changed files with 5 additions and 2 deletions

View File

@ -181,6 +181,10 @@ describe HtmlToMarkdown do
)).to eq("- Fruits\n - 🍏\n - 🍐\n - 🍌\n- Vegetables\n - 🍆\n - 🍅\n - 🍄")
end
it "supports bare <li>" do
expect(html_to_markdown("<li>I'm alone</li>")).to eq("- I'm alone")
end
it "supports <pre>" do
expect(html_to_markdown("<pre>var foo = 'bar';</pre>")).to eq("```\nvar foo = 'bar';\n```")
expect(html_to_markdown("<pre><code>var foo = 'bar';</code></pre>")).to eq("```\nvar foo = 'bar';\n```")