Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a81b322e
Commit
a81b322e
authored
Jun 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
f2fb94a7
a0de879d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
changelogs/unreleased/allow-emoji-in-references.yml
changelogs/unreleased/allow-emoji-in-references.yml
+5
-0
lib/banzai/pipeline/gfm_pipeline.rb
lib/banzai/pipeline/gfm_pipeline.rb
+1
-1
spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
+23
-0
No files found.
changelogs/unreleased/allow-emoji-in-references.yml
0 → 100644
View file @
a81b322e
---
title
:
Allow references to labels and milestones to contain emoji
merge_request
:
29284
author
:
type
:
changed
lib/banzai/pipeline/gfm_pipeline.rb
View file @
a81b322e
...
...
@@ -27,7 +27,6 @@ module Banzai
Filter
::
VideoLinkFilter
,
Filter
::
ImageLazyLoadFilter
,
Filter
::
ImageLinkFilter
,
Filter
::
EmojiFilter
,
Filter
::
TableOfContentsFilter
,
Filter
::
AutolinkFilter
,
Filter
::
ExternalLinkFilter
,
...
...
@@ -36,6 +35,7 @@ module Banzai
*
reference_filters
,
Filter
::
EmojiFilter
,
Filter
::
TaskListFilter
,
Filter
::
InlineDiffFilter
,
...
...
spec/lib/banzai/pipeline/gfm_pipeline_spec.rb
View file @
a81b322e
...
...
@@ -117,4 +117,27 @@ describe Banzai::Pipeline::GfmPipeline do
expect
(
output
).
not_to
include
(
"javascript"
)
end
end
describe
'emoji in references'
do
set
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:emoji
)
{
'💯'
}
it
'renders a label reference with emoji inside'
do
create
(
:label
,
project:
project
,
name:
emoji
)
output
=
described_class
.
to_html
(
"
#{
Label
.
reference_prefix
}
\"
#{
emoji
}
\"
"
,
project:
project
)
expect
(
output
).
to
include
(
emoji
)
expect
(
output
).
to
include
(
Gitlab
::
Routing
.
url_helpers
.
project_issues_path
(
project
,
label_name:
emoji
))
end
it
'renders a milestone reference with emoji inside'
do
milestone
=
create
(
:milestone
,
project:
project
,
title:
emoji
)
output
=
described_class
.
to_html
(
"
#{
Milestone
.
reference_prefix
}
\"
#{
emoji
}
\"
"
,
project:
project
)
expect
(
output
).
to
include
(
emoji
)
expect
(
output
).
to
include
(
Gitlab
::
Routing
.
url_helpers
.
milestone_path
(
milestone
))
end
end
end
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