diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-12-21 02:06:03 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-12-21 20:48:51 +0900 |
commit | c7c006cc68573cea356253cb1cc2c428d83fdf6c (patch) | |
tree | 6f6a60f61ea1b59362e0e4e43b8bda69768b96bc /tool/update-NEWS-refs.rb | |
parent | cc4c28ec2efa71b1c8afb4ce11409ad7b5ca1c95 (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/update-NEWS-refs.rb')
-rw-r--r-- | tool/update-NEWS-refs.rb | 3 |
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/ } |