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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filters/introduced_in.rb')
-rw-r--r--lib/filters/introduced_in.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/filters/introduced_in.rb b/lib/filters/introduced_in.rb
index acf6ec1b..4ede0b4a 100644
--- a/lib/filters/introduced_in.rb
+++ b/lib/filters/introduced_in.rb
@@ -9,20 +9,8 @@ class IntroducedInFilter < Nanoc::Filter
doc = Nokogiri::HTML.fragment(content.dup)
doc.css('blockquote').each do |blockquote|
content = blockquote.inner_html
- # Searches for a blockquote with either of the following:
- #
- # - Specific strings:
- # - "introduced <optional text> in"
- # - "removed <optional text> in"
- # - "deprecated <optional text> in"
- # - "moved <optional text> to"
- # ...followed by "GitLab"
- #
- # - The presense of "**(VERSION_INFO)**" or "- **(VERSION_INFO)**"
+ next if content !~ %r{(<a href="[^"]+">)?(</a>)?(.*)?}
- next unless content =~ %r{(<a href="[^"]+">)?(introduced|(re)?moved|deprecated)(</a>)?(.*)? (in|to).*GitLab}mi || content =~ %r{(<li>)?<strong>\(VERSION_INFO\)</strong>(</li>)?}mi
-
- content.gsub!(%r{(<li>)?<strong>\(VERSION_INFO\)</strong>(</li>)?}, "")
new_content = generate(content)
blockquote.replace(new_content)
end