diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-10-03 22:02:02 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-10-03 22:02:02 +0900 |
commit | 10379ebf90acd9622e4fccd9d4386ab3a69f4e9c () | |
tree | 6368cb6253b8c201611f8a9ceeef529695002c9b /tool/lib/vcs.rb | |
parent | ed0661e618fa9fe9e685f755f02e3a1de2d4726b (diff) |
Support regexp in log-fix [ci skip]
-rw-r--r-- | tool/lib/vcs.rb | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -707,12 +707,31 @@ class VCS range = b..b end case x - when %r[^s([#{LOG_FIX_REGEXP_SEPARATORS}])(.+)\1(.*)\1]o wrong = $2 correct = $3 range.each do |n| - s[n][wrong] = correct - rescue IndexError message = ["format_changelog failed to replace #{wrong.dump} with #{correct.dump} at #{n}\n"] from = [1, n-2].max to = [s.size-1, n+2].min |