Commit 203d79c5 authored by Guillaume Grossetie's avatar Guillaume Grossetie

Apply style guideline

Follow-up gitlab-org/gitlab#47131
parent 5a0b7fee
...@@ -24,13 +24,13 @@ RSpec.describe Banzai::Filter::AsciiDocSanitizationFilter do ...@@ -24,13 +24,13 @@ RSpec.describe Banzai::Filter::AsciiDocSanitizationFilter do
it 'preserves user-content- prefixed ids on div (blocks)' do it 'preserves user-content- prefixed ids on div (blocks)' do
html_content = <<~HTML html_content = <<~HTML
<div id="user-content-open-block" class="openblock"> <div id="user-content-open-block" class="openblock">
<div class="content"> <div class="content">
<div class="paragraph"> <div class="paragraph">
<p>This is an open block</p> <p>This is an open block</p>
</div> </div>
</div> </div>
</div> </div>
HTML HTML
output = <<~SANITIZED_HTML output = <<~SANITIZED_HTML
<div id="user-content-open-block"> <div id="user-content-open-block">
...@@ -43,6 +43,7 @@ RSpec.describe Banzai::Filter::AsciiDocSanitizationFilter do ...@@ -43,6 +43,7 @@ RSpec.describe Banzai::Filter::AsciiDocSanitizationFilter do
SANITIZED_HTML SANITIZED_HTML
expect(filter(html_content).to_html).to eq(output) expect(filter(html_content).to_html).to eq(output)
end end
it 'preserves section anchor ids' do it 'preserves section anchor ids' do
result = filter(%(<h2 id="user-content-first-section"> result = filter(%(<h2 id="user-content-first-section">
<a class="anchor" href="#user-content-first-section"></a>First section</h2>)).to_html <a class="anchor" href="#user-content-first-section"></a>First section</h2>)).to_html
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment