BigW Consortium Gitlab

Commit fdff815a by Robert Speicher

Add Markdown feature specs for markup inside links

It was already working, just want to make sure we don't break it in the future.
parent 5b3c823f
...@@ -161,6 +161,19 @@ describe 'GitLab Markdown' do ...@@ -161,6 +161,19 @@ describe 'GitLab Markdown' do
end end
end end
describe 'Edge Cases' do
it 'allows markup inside link elements' do
expect(@doc.at_css('a[href="#link-emphasis"]').to_html).
to eq %{<a href="#link-emphasis"><em>text</em></a>}
expect(@doc.at_css('a[href="#link-strong"]').to_html).
to eq %{<a href="#link-strong"><strong>text</strong></a>}
expect(@doc.at_css('a[href="#link-code"]').to_html).
to eq %{<a href="#link-code"><code>text</code></a>}
end
end
describe 'EmojiFilter' do describe 'EmojiFilter' do
it 'parses Emoji' do it 'parses Emoji' do
expect(@doc).to have_selector('img.emoji', count: 10) expect(@doc).to have_selector('img.emoji', count: 10)
......
...@@ -94,6 +94,14 @@ The problem with SanitizationFilter is that it can be too aggressive. ...@@ -94,6 +94,14 @@ The problem with SanitizationFilter is that it can be too aggressive.
| `1 < 3 & 5` | 1 &lt; 3 &amp; 5 | 1 < 3 & 5 | | `1 < 3 & 5` | 1 &lt; 3 &amp; 5 | 1 < 3 & 5 |
| `<foo>` | &lt;foo&gt; | <foo> | | `<foo>` | &lt;foo&gt; | <foo> |
### Edge Cases
Markdown should be usable inside a link. Let's try!
- [_text_](#link-emphasis)
- [**text**](#link-strong)
- [`text`](#link-code)
### EmojiFilter ### EmojiFilter
Because life would be :zzz: without Emoji, right? :rocket: Because life would be :zzz: without Emoji, right? :rocket:
......
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