Combine the two loops looking for \*QNAME\*U and "info NAME" into one.
Recognize "info NAME" only with the closing '"' to be present.
No change with current info sources.
s/\\e/&\#92;/g; # escape character
# turn quoted strings that look like info names into links
# tacky...
- while (/(\\\*Q)([A-Za-z0-9\-\.]+)(\\\*U)/) {
- $_ = $` . anchor($2) . "$'";
- }
- while (/(\"info )([A-Za-z0-9\-\.]+)/) {
- $_ = "$`\"info " . anchor($2) . "$'";
+ while (/\\\*Q([A-Za-z0-9\-\.]+)\\\*U|\"info ([A-Za-z0-9\-\.]+)\"/) {
+ if (defined $1) {
+ $_ = $` . anchor($1) . "$'";
+ } else {
+ $_ = "$`\"info " . anchor($2) . "\"$'";
+ }
}
# tranlate more troff escapes and strings
s/\\\*Q/<em>/g;