mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: Nokogumbo (#9577)
* FEATURE: Nokogumbo Use Nokogumbo HTML parser.
This commit is contained in:
parent
b8b1cbbfb9
commit
9bff0882c3
50 changed files with 165 additions and 179 deletions
|
@ -8,7 +8,7 @@ describe PrettyText do
|
|||
let(:post) { Fabricate(:post) }
|
||||
|
||||
it "supports details tag" do
|
||||
cooked_html = <<~HTML
|
||||
cooked_html = <<~HTML.gsub("\n", "")
|
||||
<details>
|
||||
<summary>
|
||||
foo</summary>
|
||||
|
@ -17,7 +17,7 @@ describe PrettyText do
|
|||
HTML
|
||||
|
||||
expect(cooked_html).to match_html(cooked_html)
|
||||
expect(PrettyText.cook("[details=foo]\nbar\n[/details]")).to match_html(cooked_html)
|
||||
expect(PrettyText.cook("[details=foo]\nbar\n[/details]").gsub("\n", "")).to match_html(cooked_html)
|
||||
end
|
||||
|
||||
it "deletes elided content" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue