X-Git-Url: http://nsz.repo.hu/git/?p=c-standard;a=blobdiff_plain;f=ann2html.sh;fp=ann2html.sh;h=6fea593a3dbf08e7c9b6f8bff71d0ac2a0d91881;hp=6b27ecd78ae25394562affce87721e90685ae261;hb=215a6de37394d96ac7d679bfdf36e79437dde89e;hpb=7580b254a0869cd01093b0b60f1ee65d573c4999 diff --git a/ann2html.sh b/ann2html.sh index 6b27ecd..6fea593 100755 --- a/ann2html.sh +++ b/ann2html.sh @@ -14,6 +14,12 @@ BEGIN { gsub(/>/, "\\>") } +!title && /^[^@]/ { + title = $0 + gsub(/ +/, " ", title) + gsub(/Committee Draft --/, "", title) +} + /^@sect Contents/ { ss[sid] = ss[sid] "\n" seencontents = 1 @@ -73,7 +79,6 @@ seencontents && !seenfore && /^[^@]/ { sid++ getline ss[sid] = ss[sid] "

" $0 "

\n" - title = $0 if (!seencontents) { ss[sid] = ss[sid] "
\n"
 	}
@@ -225,7 +230,7 @@ seencontents && !seenfore && /^[^@]/ {
 END {
 	ss[sid] = ss[sid] "
" - print "C" + print "" title "" for (i = 1; i <= sid; i++) { print ss[i]