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-23 01:26:51 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-09-23 01:26:51 +0300
commit64e0dfa5306aebdedeb65f2a6db95f4d2314f143 (patch)
treeaf0d046826e52322a8fa4ae9d0c4d1743a737c57 /app/views/help
parentc551c81e28418c67fb398d6efb2183588c09f862 (diff)
Prevent double-prefixing of help page paths
Prior, because the link "api/README.md" was matched twice, the first link became "help/help/api/README.md". Now we do a negative lookahead to make sure the link doesn't start with `help/`. This fix is still not ideal, see TODO note.
Diffstat (limited to 'app/views/help')
-rw-r--r--app/views/help/index.html.haml6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml
index f492aaf4c0a..ab7ed1b5d95 100644
--- a/app/views/help/index.html.haml
+++ b/app/views/help/index.html.haml
@@ -27,11 +27,7 @@
.col-md-8
.documentation-index
= preserve do
- - readme_text = File.read(Rails.root.join("doc", "README.md"))
- - text = readme_text.dup
- - readme_text.scan(/\]\(([^(]+)\)/) { |match| text.gsub!(match.first, "help/#{match.first}") }
- = markdown text
-
+ = markdown(@help_index)
.col-md-4
.panel.panel-default
.panel-heading