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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
3b39b648
Commit
3b39b648
authored
Sep 18, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Markdown links not showing up in dashboard activity feed
Closes #2586
parent
5a8d7324
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
CHANGELOG
CHANGELOG
+1
-0
app/helpers/gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+2
-2
spec/helpers/gitlab_markdown_helper_spec.rb
spec/helpers/gitlab_markdown_helper_spec.rb
+11
-0
No files found.
CHANGELOG
View file @
3b39b648
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
v 8.0.0 (unreleased)
v 8.0.0 (unreleased)
- Fix Markdown links not showing up in dashboard activity feed (Stan Hu)
- Fix HTML link that was improperly escaped in new user e-mail (Stan Hu)
- Fix HTML link that was improperly escaped in new user e-mail (Stan Hu)
- Fix broken sort in merge request API (Stan Hu)
- Fix broken sort in merge request API (Stan Hu)
- Bump rouge to 1.10.1 to remove warning noise and fix other syntax highlighting bugs (Stan Hu)
- Bump rouge to 1.10.1 to remove warning noise and fix other syntax highlighting bugs (Stan Hu)
...
...
app/helpers/gitlab_markdown_helper.rb
View file @
3b39b648
...
@@ -45,7 +45,7 @@ module GitlabMarkdownHelper
...
@@ -45,7 +45,7 @@ module GitlabMarkdownHelper
end
end
def
markdown
(
text
,
context
=
{})
def
markdown
(
text
,
context
=
{})
context
.
merge!
(
context
.
reverse_
merge!
(
current_user:
current_user
,
current_user:
current_user
,
path:
@path
,
path:
@path
,
project:
@project
,
project:
@project
,
...
@@ -59,7 +59,7 @@ module GitlabMarkdownHelper
...
@@ -59,7 +59,7 @@ module GitlabMarkdownHelper
# TODO (rspeicher): Remove all usages of this helper and just call `markdown`
# TODO (rspeicher): Remove all usages of this helper and just call `markdown`
# with a custom pipeline depending on the content being rendered
# with a custom pipeline depending on the content being rendered
def
gfm
(
text
,
options
=
{})
def
gfm
(
text
,
options
=
{})
options
.
merge!
(
options
.
reverse_
merge!
(
current_user:
current_user
,
current_user:
current_user
,
path:
@path
,
path:
@path
,
project:
@project
,
project:
@project
,
...
...
spec/helpers/gitlab_markdown_helper_spec.rb
View file @
3b39b648
...
@@ -38,6 +38,17 @@ describe GitlabMarkdownHelper do
...
@@ -38,6 +38,17 @@ describe GitlabMarkdownHelper do
expect
(
markdown
(
actual
)).
to
match
(
expected
)
expect
(
markdown
(
actual
)).
to
match
(
expected
)
end
end
end
end
describe
"override default project"
do
let
(
:actual
)
{
issue
.
to_reference
}
let
(
:second_project
)
{
create
(
:project
)
}
let
(
:second_issue
)
{
create
(
:issue
,
project:
second_project
)
}
it
'should link to the issue'
do
expected
=
namespace_project_issue_path
(
second_project
.
namespace
,
second_project
,
second_issue
)
expect
(
markdown
(
actual
,
project:
second_project
)).
to
match
(
expected
)
end
end
end
end
describe
'#link_to_gfm'
do
describe
'#link_to_gfm'
do
...
...
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