From 64e0dfa5306aebdedeb65f2a6db95f4d2314f143 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 22 Sep 2015 18:26:51 -0400 Subject: 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. --- app/views/help/index.html.haml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/views/help') 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 -- cgit v1.2.1