diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-09-23 01:26:51 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-09-23 01:26:51 +0300 |
commit | 64e0dfa5306aebdedeb65f2a6db95f4d2314f143 (patch) | |
tree | af0d046826e52322a8fa4ae9d0c4d1743a737c57 /app/views/help | |
parent | c551c81e28418c67fb398d6efb2183588c09f862 (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.haml | 6 |
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 |