1
0
Fork 0

News page now includes heading ids to be used as anchors

website
Mike Gerwitz 2014-07-28 00:47:43 -04:00
parent 8a4bbfe73b
commit d14204634d
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 4 additions and 8 deletions

View File

@ -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 "<h3 class=\"git-commit\">"
printf "<h3 id=\"%s\" class=\"git-commit\">", commit
do {
escprint( $0 " " )