mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: remove oga gem
oga gem is automatically required by the aws gem the oga gem retains about 1mb of memory, aws now uses nokogiri This also removes the html normalize from the pretty text specs that was a fair bit buggy as the polls test shows.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
require 'rails_helper'
|
||||
require 'html_normalize'
|
||||
|
||||
describe PrettyText do
|
||||
|
||||
def n(html)
|
||||
HtmlNormalize.normalize(html)
|
||||
html.strip
|
||||
end
|
||||
|
||||
it 'supports multi choice polls' do
|
||||
@@ -95,14 +94,13 @@ describe PrettyText do
|
||||
cooked = PrettyText.cook md
|
||||
|
||||
expected = <<~MD
|
||||
<div class="poll" data-poll-status="open" data-poll-name="poll" data-poll-type="multiple">
|
||||
<div class="poll" data-poll-status="open" data-poll-type="multiple" data-poll-name="poll">
|
||||
<div>
|
||||
<div class="poll-container">
|
||||
<ol>
|
||||
<li data-poll-option-id='b6475cbf6acb8676b20c60582cfc487a'>test 1 <img alt=':slight_smile:' class='emoji' src='/images/emoji/twitter/slight_smile.png?v=5' title=':slight_smile:'> <b>test</b>
|
||||
</li>
|
||||
<li data-poll-option-id='7158af352698eb1443d709818df097d4'>test 2</li>
|
||||
<li data-poll-option-id="b6475cbf6acb8676b20c60582cfc487a">test 1 <img src="/images/emoji/twitter/slight_smile.png?v=5" title=":slight_smile:" class="emoji" alt=":slight_smile:"> <b>test</b>
|
||||
</li>
|
||||
<li data-poll-option-id="7158af352698eb1443d709818df097d4">test 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="poll-info">
|
||||
@@ -110,12 +108,9 @@ describe PrettyText do
|
||||
<span class="info-number">0</span>
|
||||
<span class="info-text">voters</span>
|
||||
</p>
|
||||
<p>
|
||||
Choose up to <strong>2</strong> options</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="poll-buttons">
|
||||
<a title="Cast your votes">Vote now!</a>
|
||||
<a title="Display the poll results">Show results</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user