fix specs
This commit is contained in:
parent
f84e82f324
commit
1140e0a435
|
@ -4,13 +4,12 @@ describe PrettyText do
|
||||||
|
|
||||||
context 'markdown it' do
|
context 'markdown it' do
|
||||||
before do
|
before do
|
||||||
SiteSetting.enable_experimental_markdown_it = true
|
|
||||||
SiteSetting.discourse_math_enabled = true
|
SiteSetting.discourse_math_enabled = true
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can handle inline math' do
|
it 'can handle inline math' do
|
||||||
cooked = PrettyText.cook('I like $\{a,b\}\$<a>$ etc..')
|
cooked = PrettyText.cook('I like $\{a,b\}\$<a>$ etc')
|
||||||
html = '<p>I like <span class="math">\{a,b\}\$<a></span> etc..</p>'
|
html = '<p>I like <span class="math">\{a,b\}\$<a></span> etc</p>'
|
||||||
expect(cooked).to eq(html)
|
expect(cooked).to eq(html)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -46,7 +45,7 @@ describe PrettyText do
|
||||||
$$
|
$$
|
||||||
\{a,b\}\$<a>
|
\{a,b\}\$<a>
|
||||||
$$
|
$$
|
||||||
etc..
|
etc
|
||||||
MD
|
MD
|
||||||
|
|
||||||
html = <<~HTML
|
html = <<~HTML
|
||||||
|
@ -54,7 +53,7 @@ describe PrettyText do
|
||||||
<div class="math">
|
<div class="math">
|
||||||
{a,b}$<a>
|
{a,b}$<a>
|
||||||
</div>
|
</div>
|
||||||
<p>etc..</p>
|
<p>etc</p>
|
||||||
HTML
|
HTML
|
||||||
|
|
||||||
expect(cooked).to eq(html.strip)
|
expect(cooked).to eq(html.strip)
|
||||||
|
|
Loading…
Reference in New Issue