Skip to content
Snippets Groups Projects
Commit 27fca704 authored by Morris Jette's avatar Morris Jette
Browse files

Better support for new man2html

The latest version of man2html used to make web pages from man pages
produces slightly different output. This patch from Rod Schultz (Bull)
will work with the latest version of man2html plus older versions.
parent 5a22bea7
No related branches found
No related tags found
No related merge requests found
......@@ -89,8 +89,10 @@ def llnl_references(line):
return line
def relative_reference(lineIn):
fullRef = "http://localhost/cgi-bin/man/man2html"
fullRef = "/cgi-bin/man/man2html"
lenRef = len(fullRef)
refAnchor="<A HREF=";
lenRefAnchor = len(refAnchor)
lineOt = ""
cursor = 0
......@@ -103,7 +105,8 @@ def relative_reference(lineIn):
return ""
return "<i>man2html</i> "
while posHREF != -1:
lineOt = lineOt + lineIn[cursor:posHREF-1]
posRefAnchor = lineIn.find(refAnchor,cursor)
lineOt = lineOt + lineIn[cursor:posRefAnchor+lenRefAnchor]
cursor = posHREF + lenRef + 3
lineOt = lineOt + '"'
posQuote = lineIn.find('"',cursor)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment