diff options
author | Evan Read <eread@gitlab.com> | 2020-11-18 03:29:05 +0300 |
---|---|---|
committer | Evan Read <eread@gitlab.com> | 2020-11-18 05:16:50 +0300 |
commit | abe28229d9978be6012568850157bea013b527b4 (patch) | |
tree | 6cd702f57edf99aa6114b3382710996c21981981 /lib/filters | |
parent | 9a85f2ea8c75882b90d07f89b89a99a7e13b652f (diff) |
Fix more Rubocop issues
Diffstat (limited to 'lib/filters')
-rw-r--r-- | lib/filters/introduced_in.rb | 1 | ||||
-rw-r--r-- | lib/filters/markdown_to_html_ext.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/filters/introduced_in.rb b/lib/filters/introduced_in.rb index 27f4a892f..e0b5a7aba 100644 --- a/lib/filters/introduced_in.rb +++ b/lib/filters/introduced_in.rb @@ -10,6 +10,7 @@ class IntroducedInFilter < Nanoc::Filter doc.css('blockquote').each do |blockquote| content = blockquote.inner_html next if content !~ /(<a href="[^"]+">)?((introduced(<\/a>)? in)|(moved(<\/a>)? to))(<a href="[^"]+">)?.*GitLab/mi + new_content = generate(content) blockquote.replace(new_content) end diff --git a/lib/filters/markdown_to_html_ext.rb b/lib/filters/markdown_to_html_ext.rb index 3f6d99b59..63e6707a5 100644 --- a/lib/filters/markdown_to_html_ext.rb +++ b/lib/filters/markdown_to_html_ext.rb @@ -3,7 +3,7 @@ module Nanoc::Filters identifier :md_to_html_ext # Convert internal URLs that link to `.md` files to instead link to - #{ }`.html` files since that's what Nanoc actually serves. + # { }`.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 /^href="http/.match(result).nil? # Check if link is internal |