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:
authorMarcel Amirault <mamirault@gitlab.com>2021-03-05 14:25:23 +0300
committerMarcel Amirault <mamirault@gitlab.com>2021-03-05 14:25:23 +0300
commit4a53b864e4a2df1bff7b7dd26a41ba2f02e79dfd (patch)
tree854422cc3ef7c0eab2d2b4f6810c6e11fe440729
parent9c1e8a54c40b6cff85141e58e9398d1e8a7da093 (diff)
parent2994c93d996f0d5bf01914be6ad7cc74bd7b7f7f (diff)
Merge branch 'msj-introduced-removed' into 'master'
introduced_in.rb accepts "deprecated" / "removed" See merge request gitlab-org/gitlab-docs!1576
-rw-r--r--lib/filters/introduced_in.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/filters/introduced_in.rb b/lib/filters/introduced_in.rb
index e0b5a7ab..325ec031 100644
--- a/lib/filters/introduced_in.rb
+++ b/lib/filters/introduced_in.rb
@@ -9,7 +9,13 @@ class IntroducedInFilter < Nanoc::Filter
doc = Nokogiri::HTML.fragment(content.dup)
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
+ # Searches for a blockquote with either:
+ # - "introduced in"
+ # - "removed in"
+ # - "deprecated in"
+ # - "moved to"
+ # ...followed by "GitLab"
+ next if content !~ /(<a href="[^"]+">)?(introduced|(re)?moved|deprecated)(<\/a>)? (in|to).*GitLab/mi
new_content = generate(content)
blockquote.replace(new_content)