Skip to content

Commit b30e7eb

Browse files
authored
make NEWS-update.jl more robust in trimming existing links (#59305)
The `NEWS-update.jl` script trims away any existing links from the end of the `NEWS.md` file, so that it is safe to run multiple times. This PR makes that trimming a bit more robust by trimming only `[#...]:` patterns that start at the beginning of a line. (I ran into this in re-using the same script for another project.)
1 parent 97d507b commit b30e7eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/NEWS-update.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ NEWS = get(ARGS, 1, "NEWS.md")
55

66
s = read(NEWS, String)
77

8-
m = match(r"\[#[0-9]+\]:", s)
8+
m = match(r"^\[#[0-9]+\]:"m, s)
99
if m !== nothing
1010
s = s[1:m.offset-1]
1111
end

0 commit comments

Comments
 (0)