Erlang: display module node in the symbols tree
[geany-mirror.git] / scripts / github-news
bloba1858c2715dc0ddddbaf33f1400ce3bb3d93226f
1 #!/bin/sh
3 # Converts the last NEWS entry to GitHub format
5 sed -n -e '
7 :next
9 # Merge continuation lines (starting with 6+ spaces) into the previous line.
10 # Implementation is a bit convoluted, but heres the gist of it:
11 # hold the current line...
13 # ...read next one (potential continuation)
15 # if its a continuation line...
16 /^ \{6,\}/{
17 # swap back the non-continuation line
19 # ...so to append the continuation
21 # replace the newline + spaces with a single space
22 s/\n */ /
23 # and check next line again
24 b next
26 # not a continuation line, restore the current and hold the next
29 # stop at the second header
30 /^[A-Za-z0-9_-]/q
31 # strip the leading indentation
32 s/^ //
33 # Make titles
34 s/^[A-Za-z0-9_-]/## \0/
35 # Turn PR and Issue references to links
36 s%PR#\([0-9]\{1,\}\)%[\0](https://github.com/geany/geany/pull/\1)%g
37 s%Issue#\([0-9]\{1,\}\)%[\0](https://github.com/geany/geany/issues/\1)%g
41 # restore the non-continuation line we peeked at, and start next cycle
43 b next
44 ' < NEWS