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
path: root/app
diff options
context:
space:
mode:
authorGuillaume Grossetie <g.grossetie@gmail.com>2019-06-14 10:53:08 +0300
committerJames Lopez <james@gitlab.com>2019-06-14 10:53:08 +0300
commit3f5d7c7e1c9a8b5ba53996e8a8f2f4881929b2ea (patch)
tree6b8c33c73a5391953e9da8c9d7b7f2c72295cf07 /app
parentcd300323c8cc6744c46ef3f732c412226615abbf (diff)
Add basic support for AsciiDoc include directive
See http://asciidoctor.org/docs/user-manual/#include-directive
Diffstat (limited to 'app')
-rw-r--r--app/helpers/markup_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/markup_helper.rb b/app/helpers/markup_helper.rb
index dce4168ad7b..bf894360a2e 100644
--- a/app/helpers/markup_helper.rb
+++ b/app/helpers/markup_helper.rb
@@ -263,6 +263,11 @@ module MarkupHelper
end
def asciidoc_unsafe(text, context = {})
+ context.merge!(
+ commit: @commit,
+ ref: @ref,
+ requested_path: @path
+ )
Gitlab::Asciidoc.render(text, context)
end