BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
fdff815a
Commit
fdff815a
authored
May 06, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
markdown_spec.rb
spec/features/markdown_spec.rb
+13
-0
markdown.md.erb
spec/fixtures/markdown.md.erb
+8
-0
No files found.
spec/features/markdown_spec.rb
View file @
fdff815a
...
...
@@ -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
)
...
...
spec/fixtures/markdown.md.erb
View file @
fdff815a
...
...
@@ -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
>
` |
<
foo
>
|
<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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment