Merge branch '51200-markdown-footnotes-don-t-render-when-inside-a-table' into 'master'

Resolve "Markdown footnotes don't render when inside a table..."

Closes #51200

See merge request gitlab-org/gitlab-ce!21675
This commit is contained in:
Douwe Maan 2018-09-12 13:50:08 +00:00
commit d12c81cc5a
2 changed files with 18 additions and 1 deletions

View File

@ -125,7 +125,7 @@ GEM
coderay (1.1.2)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
commonmarker (0.17.8)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concord (0.1.5)
adamantium (~> 0.2.0)

View File

@ -66,4 +66,21 @@ describe Banzai::Filter::MarkdownFilter do
end
end
end
describe 'footnotes in tables' do
it 'processes footnotes in table cells' do
text = <<-MD.strip_heredoc
| Column1 |
| --------- |
| foot [^1] |
[^1]: a footnote
MD
result = filter(text)
expect(result).to include('<td>foot <sup')
expect(result).to include('<section class="footnotes">')
end
end
end