summaryrefslogtreecommitdiff
path: root/app/controllers/help_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-24 09:40:32 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-24 09:40:32 +0200
commitea583955252d04ad89819c335e77f811b3d3b3c7 (patch)
tree66480eeecf3c6f06707dfe2e334230143ec1621c /app/controllers/help_controller.rb
parentd538955ac89c0bffd5b0d5ebff73f81c4efb21ee (diff)
parenta58c6e9a9561ffbb3d16a3a9a45bd90a34735b50 (diff)
downloadgitlab-ce-ea583955252d04ad89819c335e77f811b3d3b3c7.tar.gz
Merge branch 'master' into move-ci-charts
Diffstat (limited to 'app/controllers/help_controller.rb')
-rw-r--r--app/controllers/help_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index ad00948da51..55050615473 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -4,6 +4,11 @@ class HelpController < ApplicationController
layout 'help'
def index
+ @help_index = File.read(Rails.root.join('doc', 'README.md'))
+
+ # Prefix Markdown links with `help/` unless they already have been
+ # See http://rubular.com/r/nwwhzH6Z8X
+ @help_index.gsub!(/(\]\()(?!help\/)([^\)\(]+)(\))/, '\1help/\2\3')
end
def show