mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: supports bare <li> when converting html to markdown
This commit is contained in:
@ -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```")
|
||||
|
Reference in New Issue
Block a user