Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-09-01 01:09:18 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-09-01 01:09:18 +0300
commit2930041886fb616bd98ba31627d0ce53e0f7603a (patch)
treea7c589875b3405064ccf0ed8c0b601d1a1271764 /app/helpers/gitlab_markdown_helper.rb
parentc104f4d590b16d4784d029c953be90fda130e8b4 (diff)
Make sure the `gfm` helper passes the required options
This adds some duplication, but this helper is temporary.
Diffstat (limited to 'app/helpers/gitlab_markdown_helper.rb')
-rw-r--r--app/helpers/gitlab_markdown_helper.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index 225caca1f42..b742419fbfe 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -52,7 +52,7 @@ module GitlabMarkdownHelper
path: @path,
project: @project,
project_wiki: @project_wiki,
- ref: @ref,
+ ref: @ref
)
Gitlab::Markdown.render(text, context)
@@ -61,6 +61,14 @@ module GitlabMarkdownHelper
# 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