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.
This commit is contained in:
Robert Speicher
2015-05-06 17:21:19 -04:00
parent 5b3c823fc9
commit fdff815a4c
2 changed files with 21 additions and 0 deletions
+13
View File
@@ -161,6 +161,19 @@ describe 'GitLab Markdown' do
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
it 'parses Emoji' do
expect(@doc).to have_selector('img.emoji', count: 10)
+8
View File
@@ -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 |
| `<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
Because life would be :zzz: without Emoji, right? :rocket: