diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-05-09 15:14:24 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-05-24 16:47:35 +0300 |
commit | 3ca932844316f567f9ed091d7185ad9fafc27c51 (patch) | |
tree | ccb51fd4994c624fa3118ba60644ba7f410e7e6e /spec/lib/banzai/filter/sanitization_filter_spec.rb | |
parent | 0b946a7bc69058a952a558a9530cd3e8302361e7 (diff) |
Fix LaTeX formatting for AsciiDoc wiki
Diffstat (limited to 'spec/lib/banzai/filter/sanitization_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/sanitization_filter_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/sanitization_filter_spec.rb b/spec/lib/banzai/filter/sanitization_filter_spec.rb index fdbc65b5e00..fb7862f49a2 100644 --- a/spec/lib/banzai/filter/sanitization_filter_spec.rb +++ b/spec/lib/banzai/filter/sanitization_filter_spec.rb @@ -97,6 +97,22 @@ describe Banzai::Filter::SanitizationFilter, lib: true do expect(filter(act).to_html).to eq exp end + it 'allows `data-math-style` attribute on `code` and `pre` elements' do + html = <<-HTML + <pre class="code" data-math-style="inline">something</pre> + <code class="code" data-math-style="inline">something</code> + <div class="code" data-math-style="inline">something</div> + HTML + + output = <<-HTML + <pre data-math-style="inline">something</pre> + <code data-math-style="inline">something</code> + <div>something</div> + HTML + + expect(filter(html).to_html).to eq(output) + end + it 'removes `rel` attribute from `a` elements' do act = %q{<a href="#" rel="nofollow">Link</a>} exp = %q{<a href="#">Link</a>} |