scripts: preserve changelog subsection detection

This commit is contained in:
Gustavo Madeira Santana 2026-03-30 21:05:11 -04:00
parent 2412357bb7
commit bf6d3176fc
No known key found for this signature in database
1 changed files with 3 additions and 5 deletions

View File

@ -226,14 +226,12 @@ END {
release_line = 0
section_line = 0
for (i = entry_line; i >= 1; i--) {
if (release_line == 0 && changelog[i] ~ /^## /) {
release_line = i
}
if (changelog[i] ~ /^### /) {
if (section_line == 0 && changelog[i] ~ /^### /) {
section_line = i
break
continue
}
if (changelog[i] ~ /^## /) {
release_line = i
break
}
}