next
}
-/^ *(Syntax|Semantics|Description|Constraints|Synopsis|Returns|Recommended practice|Implementation limits)$/ {
+/^ ?(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)