summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorGuillaume Grossetie <g.grossetie@gmail.com>2019-06-14 07:53:08 +0000
committerJames Lopez <james@gitlab.com>2019-06-14 07:53:08 +0000
commit3f5d7c7e1c9a8b5ba53996e8a8f2f4881929b2ea (patch)
tree6b8c33c73a5391953e9da8c9d7b7f2c72295cf07 /app/helpers
parentcd300323c8cc6744c46ef3f732c412226615abbf (diff)
downloadgitlab-ce-3f5d7c7e1c9a8b5ba53996e8a8f2f4881929b2ea.tar.gz
Add basic support for AsciiDoc include directive
See http://asciidoctor.org/docs/user-manual/#include-directive
Diffstat (limited to 'app/helpers')
-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