From d14204634d82fd4a5c8c48b33417bbdb74b5b14d Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 28 Jul 2014 00:47:43 -0400 Subject: [PATCH] News page now includes heading ids to be used as anchors --- tools/news-fmt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/news-fmt b/tools/news-fmt index bde7fbb..b197670 100755 --- a/tools/news-fmt +++ b/tools/news-fmt @@ -34,19 +34,15 @@ function escprint( str ) } -/^commit / { next } - -# store author -match( $0, /^Author: *([^<]+)/, a ) { author = a[1]; next } - -# store date -match( $0, /^Date: *[^ ]+ ([^ ]+ [^ ]+ [^ ]+)/, a ) { date = a[1]; next } +match( $0, /^commit *(.{7})/, m ) { commit = m[1]; next } +match( $0, /^Author: *([^<]+)/, m ) { author = m[1]; next } +match( $0, /^Date: *[^ ]+ ([^ ]+ [^ ]+ [^ ]+)/, m ) { date = m[1]; next } # commit messages are indented by four spaces, with the subject line # occupying the first paragraph (that is---until an empty line) /^ / { # begin the subject line output - printf "

" + printf "

", commit do { escprint( $0 " " )