next
}
+/^@sect 3\./ {
+ markdef = 1
+}
+
/^@sect/ {
sid++
slevel = split($2,a,/\./)+1
/^@end pre/ {
if (!pre)
next
- pre = pre "</pre>\n"
+ pre = pre "\n</pre>\n"
if (nn)
note[nn] = note[nn] "\n" pre
else
next
}
-/^ *(Syntax|Semantics|Description|Constraints|Synopsis|Returns)$/ {
+/^ ?(Syntax|Semantics|Description|Constraints|Synopsis|Returns|Recommended practice|Implementation limits|Environmental limits)$/ {
ss[sid] = ss[sid] "<h6>" $0 "</h6>\n"
next
}
}
s = p s
p = ""
- while (match(s, noteid "\\)")) {
+ # TODO: false positives..
+ while (match(s, /[a-z]opt[ )]/))
+ s = substr(s,1,RSTART) "<sub>opt</sub>" substr(s,RSTART+RLENGTH-1)
+ if (match(s, /[a-z]opt$/))
+ s = substr(s,1,RSTART) "<sub>opt</sub>"
+ for (;;) {
+ while (match(s, noteid-1 "\\)")) {
+ p = p substr(s,1,RSTART-1)
+ p = p "<sup><a href=\"#note" noteid-1 "\"><b>" noteid-1 ")</b></a></sup>"
+ s = substr(s,RSTART+RLENGTH)
+ }
+ if (!match(s, noteid "\\)"))
+ break
if (noteid==1 && s !~ /\.1\)/)
break
p = p substr(s,1,RSTART-1)
}
s = p s
sub(/^ *Forward references/, "<p><b>&</b>", s)
+ if (markdef) {
+ s = "<b>" s "</b><br>"
+ markdef = 0
+ }
if (pre)
pre = pre "\n" s
else if (nn)