summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-21 02:06:03 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-12-21 20:48:51 +0900
commitc7c006cc68573cea356253cb1cc2c428d83fdf6c (patch)
tree6f6a60f61ea1b59362e0e4e43b8bda69768b96bc /tool
parentcc4c28ec2efa71b1c8afb4ce11409ad7b5ca1c95 (diff)
[DOC] tool/update-NEWS-refs.rb: Remove extra brackets
Surrounding with brackets is just a convention for the bugs tracker links.
Diffstat (limited to 'tool')
-rw-r--r--tool/update-NEWS-refs.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/update-NEWS-refs.rb b/tool/update-NEWS-refs.rb
index b492e9e7d6..5076c6ec0a 100644
--- a/tool/update-NEWS-refs.rb
+++ b/tool/update-NEWS-refs.rb
@@ -12,9 +12,12 @@ if links.empty? || lines.last != ""
raise "NEWS.md must end with a sequence of links"
end
+labels = links.keys.select {|k| !(k.start_with?("Feature") || k.start_with?("Bug"))}
new_src = lines.join("\n").gsub(/\[?\[((?:Feature|Bug)\s+#(\d+))\]\]?/) do
links[$1] ||= "[#$1]: ".ljust(18) + "https://bugs.ruby-lang.org/issues/#$2"
"[[#$1]]"
+end.gsub(/\[\[#{Regexp.union(labels)}\]\]?/) do
+ "[#$1]"
end.chomp + "\n\n"
redmine_links, non_redmine_links = links.partition {|k,| k =~ /\A(Feature|Bug)\s+#\d+\z/ }