annot fix: end pre before para
[c-standard] / annot.sh
index debb71d..a2cc13b 100755 (executable)
--- a/annot.sh
+++ b/annot.sh
@@ -182,8 +182,10 @@ BEGIN {
                indent = 0
        for (i = 1; i < n; i++) {
                if (a[i] ~ /^@/) {
                indent = 0
        for (i = 1; i < n; i++) {
                if (a[i] ~ /^@/) {
-                       if (a[i] ~ /^@para/)
+                       if (a[i] ~ /^@para/) {
+                               endpre()
                                endlist()
                                endlist()
+                       }
                        print a[i]
                } else {
                        s = substr(a[i], indent+1)
                        print a[i]
                } else {
                        s = substr(a[i], indent+1)