Commit e70ec83
committed
fix(scripts): detect version heading at file start
indexOf('\n## ') required a preceding newline, so a root
CHANGELOG that begins directly with a "## <version>" heading
(e.g. after a human strips the "# Changelog" header) was
treated as having no version block, and new content got
appended to the end instead of spliced at the top. Switch to
a multiline regex that matches "## " at any line start,
including line 0.1 parent a5394ca commit e70ec83
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
0 commit comments