diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-12-22 14:16:31 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-12-22 14:16:31 +0100 |
commit | e46f2c53a282367581c5e4cb611a60dc20a59133 (patch) | |
tree | 53c0345bf0680c93d3251e2d3ce27fee7a6f98d2 /spec/lib/banzai | |
parent | 6d9c1d3efce00da95832feaaf36227bcbffecadf (diff) | |
download | gitlab-ce-inline-math-dollar.tar.gz |
Don't render inline math when dollar signs are inside markupinline-math-dollar
Diffstat (limited to 'spec/lib/banzai')
-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 |