diff --git a/lib/markdown_to_html.rb b/lib/markdown_to_html.rb
index c66b88b1..e9d04f75 100644
--- a/lib/markdown_to_html.rb
+++ b/lib/markdown_to_html.rb
@@ -2,11 +2,12 @@
module MarkdownToHtml
LINK_REGEXP = %r{\[([^\]]+)\]\((https?://[^)]+)\)}
- LINK_REPLACE = '\1'
module_function
def call(text)
- text.gsub(LINK_REGEXP, LINK_REPLACE)
+ text.gsub(LINK_REGEXP) do
+ ApplicationController.helpers.link_to(Regexp.last_match(1), Regexp.last_match(2))
+ end
end
end