Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-11-10 02:17:14 +0300
committerConnor Shea <connor.james.shea@gmail.com>2016-11-10 02:17:14 +0300
commit10684f9c2e85b1a6553bca2ad8e2137745b46bdf (patch)
tree2c50a229d56e9684aea178874246e5e57ffe21ba /lib
parent810ddc9fcdab13f31e3783dc8e789f95fd559d0a (diff)
Improve the matcher for markdown links.
Diffstat (limited to 'lib')
-rw-r--r--lib/filters/markdown_to_html_ext.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/filters/markdown_to_html_ext.rb b/lib/filters/markdown_to_html_ext.rb
index afb4fdee..3f6d99b5 100644
--- a/lib/filters/markdown_to_html_ext.rb
+++ b/lib/filters/markdown_to_html_ext.rb
@@ -6,7 +6,7 @@ module Nanoc::Filters
#{ }`.html` files since that's what Nanoc actually serves.
def run(content, params = {})
content.gsub(/href="(\S*.md\S*)"/) do |result| # Fetch all links in the HTML Document
- if /http/.match(result).nil? # Check if link is internal
+ if /^href="http/.match(result).nil? # Check if link is internal
result.gsub!(/\.md/, '.html') # Replace the extension if link is internal
end
result