Tighten up emp2html's info reference recognition
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.
This commit is contained in:
parent
955bdeb223
commit
7a730be185
1 changed files with 6 additions and 5 deletions
|
@ -182,11 +182,12 @@ sub htmlify {
|
||||||
s/\\e/&\#92;/g; # escape character
|
s/\\e/&\#92;/g; # escape character
|
||||||
# turn quoted strings that look like info names into links
|
# turn quoted strings that look like info names into links
|
||||||
# tacky...
|
# tacky...
|
||||||
while (/(\\\*Q)([A-Za-z0-9\-\.]+)(\\\*U)/) {
|
while (/\\\*Q([A-Za-z0-9\-\.]+)\\\*U|\"info ([A-Za-z0-9\-\.]+)\"/) {
|
||||||
$_ = $` . anchor($2) . "$'";
|
if (defined $1) {
|
||||||
|
$_ = $` . anchor($1) . "$'";
|
||||||
|
} else {
|
||||||
|
$_ = "$`\"info " . anchor($2) . "\"$'";
|
||||||
}
|
}
|
||||||
while (/(\"info )([A-Za-z0-9\-\.]+)/) {
|
|
||||||
$_ = "$`\"info " . anchor($2) . "$'";
|
|
||||||
}
|
}
|
||||||
# tranlate more troff escapes and strings
|
# tranlate more troff escapes and strings
|
||||||
s/\\\*Q/<em>/g;
|
s/\\\*Q/<em>/g;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue