Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
4e25623e46a8
Commit
29300418
authored
Aug 31, 2015
by
Robert Speicher
Browse files
Make sure the `gfm` helper passes the required options
This adds some duplication, but this helper is temporary.
parent
1a15934cb293
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/helpers/gitlab_markdown_helper.rb
View file @
4e25623e
...
...
@@ -52,7 +52,7 @@ def markdown(text, context = {})
path:
@path
,
project:
@project
,
project_wiki:
@project_wiki
,
ref:
@ref
,
ref:
@ref
)
Gitlab
::
Markdown
.
render
(
text
,
context
)
...
...
@@ -61,6 +61,14 @@ def markdown(text, context = {})
# TODO (rspeicher): Remove all usages of this helper and just call `markdown`
# with a custom pipeline depending on the content being rendered
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
)
end
...
...
spec/features/gitlab_flavored_markdown_spec.rb
View file @
4e25623e
...
...
@@ -77,7 +77,7 @@
it
"should render details in issues#show"
do
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
...
...
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