diff options
author | Robert Speicher <robert@gitlab.com> | 2016-12-22 17:23:37 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-12-22 17:23:37 +0300 |
commit | 7e26afe6e8cb0f7b2b93968cb77ad06cf1631ee5 (patch) | |
tree | c974a1a66e751ea5c2f497ebeb9101956246a653 /spec | |
parent | deb3cd7153f6ad5ee9ec14c1d360102d8d6102c3 (diff) | |
parent | e46f2c53a282367581c5e4cb611a60dc20a59133 (diff) |
Merge branch 'inline-math-dollar' into 'master'
Don't render inline math when dollar signs are inside markup
See merge request !8259
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/banzai/filter/math_filter_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/math_filter_spec.rb b/spec/lib/banzai/filter/math_filter_spec.rb index 3fe2c7f5d5d..51883782e19 100644 --- a/spec/lib/banzai/filter/math_filter_spec.rb +++ b/spec/lib/banzai/filter/math_filter_spec.rb @@ -79,6 +79,13 @@ describe Banzai::Filter::MathFilter, lib: true do expect(doc.to_s).to eq input end + it 'ignores dollar signs if they are inside another element' do + input = '<p>We check strictly <em>$</em><code>2+2</code><em>$</em></p>' + doc = filter(input) + + expect(doc.to_s).to eq input + end + # Display math it 'adds data-math-style display attribute to display math' do |