From 54ff9d90adc66f88c608b2157789d71b0944590e Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Wed, 28 May 2014 14:37:08 +0200 Subject: [PATCH] Scan the text and add the help path. --- app/views/help/index.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index ca8e17d..87fa5ef 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -38,4 +38,7 @@ .title Documentation = preserve do - = markdown File.read(Rails.root.join("doc", "README.md")) + - 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 -- libgit2 0.21.2