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
Kazuhiko Shiozaki
gitlab-ce
Commits
29300418
Commit
29300418
authored
Aug 31, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure the `gfm` helper passes the required options
This adds some duplication, but this helper is temporary.
parent
c104f4d5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
app/helpers/gitlab_markdown_helper.rb
app/helpers/gitlab_markdown_helper.rb
+9
-1
spec/features/gitlab_flavored_markdown_spec.rb
spec/features/gitlab_flavored_markdown_spec.rb
+1
-1
No files found.
app/helpers/gitlab_markdown_helper.rb
View file @
29300418
...
@@ -52,7 +52,7 @@ module GitlabMarkdownHelper
...
@@ -52,7 +52,7 @@ module GitlabMarkdownHelper
path:
@path
,
path:
@path
,
project:
@project
,
project:
@project
,
project_wiki:
@project_wiki
,
project_wiki:
@project_wiki
,
ref:
@ref
,
ref:
@ref
)
)
Gitlab
::
Markdown
.
render
(
text
,
context
)
Gitlab
::
Markdown
.
render
(
text
,
context
)
...
@@ -61,6 +61,14 @@ module GitlabMarkdownHelper
...
@@ -61,6 +61,14 @@ 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!
(
current_user:
current_user
,
path:
@path
,
project:
@project
,
project_wiki:
@project_wiki
,
ref:
@ref
)
Gitlab
::
Markdown
.
gfm
(
text
,
options
)
Gitlab
::
Markdown
.
gfm
(
text
,
options
)
end
end
...
...
spec/features/gitlab_flavored_markdown_spec.rb
View file @
29300418
...
@@ -77,7 +77,7 @@ describe "GitLab Flavored Markdown", feature: true do
...
@@ -77,7 +77,7 @@ describe "GitLab Flavored Markdown", feature: true do
it
"should render details in issues#show"
do
it
"should render details in issues#show"
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
@issue
)
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
@issue
)
expect
(
page
).
to
have_link
(
"@
#{
fred
.
username
}
"
)
expect
(
page
).
to
have_link
(
fred
.
to_reference
)
end
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