diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-11-10 02:17:14 +0300 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-11-10 02:17:14 +0300 |
commit | 10684f9c2e85b1a6553bca2ad8e2137745b46bdf (patch) | |
tree | 2c50a229d56e9684aea178874246e5e57ffe21ba /lib | |
parent | 810ddc9fcdab13f31e3783dc8e789f95fd559d0a (diff) |
Improve the matcher for markdown links.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filters/markdown_to_html_ext.rb | 2 |
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 |