Commit 84b86a3b authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'issue-292065-followup-asciidoc-preserve-xref-ids' into 'master'

Follow-up !47131 Apply style guideline

See merge request gitlab-org/gitlab!49496
parents 95777233 203d79c5
......@@ -24,13 +24,13 @@ RSpec.describe Banzai::Filter::AsciiDocSanitizationFilter do
it 'preserves user-content- prefixed ids on div (blocks)' do
html_content = <<~HTML
<div id="user-content-open-block" class="openblock">
<div id="user-content-open-block" class="openblock">
<div class="content">
<div class="paragraph">
<p>This is an open block</p>
</div>
</div>
</div>
</div>
HTML
output = <<~SANITIZED_HTML
<div id="user-content-open-block">
......@@ -43,6 +43,7 @@ RSpec.describe Banzai::Filter::AsciiDocSanitizationFilter do
SANITIZED_HTML
expect(filter(html_content).to_html).to eq(output)
end
it 'preserves section anchor ids' do
result = filter(%(<h2 id="user-content-first-section">
<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