diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-09-12 13:50:08 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-09-12 13:50:08 +0000 |
commit | d12c81cc5a5bc59c6f4d18fb49bc19ac2f4fb9e1 (patch) | |
tree | b478caeb41d697ef183f74dba4ac86ed9f73a6a4 /spec/lib | |
parent | 9f7844e25659fe1e433c0bc5ec8eb9e96e77f223 (diff) | |
parent | 0b9365b6ef45285d59a4bb7ab12d5c44723aa9c8 (diff) | |
download | gitlab-ce-d12c81cc5a5bc59c6f4d18fb49bc19ac2f4fb9e1.tar.gz |
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
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/banzai/filter/markdown_filter_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/markdown_filter_spec.rb b/spec/lib/banzai/filter/markdown_filter_spec.rb index 5cf9e698375..cf49249756a 100644 --- a/spec/lib/banzai/filter/markdown_filter_spec.rb +++ b/spec/lib/banzai/filter/markdown_filter_spec.rb @@ -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 |