Hi Anthony! > Attempting to infer semantic information (links) from a manpage written > in an inherently non-semantic format like man(7) has poor prospects.
Technically correct. However for practical purposes it seems to work. > A typical example is yacc(1); Actually the yacc(1) man page is handled perfectly by my post-processing solution. But you are still correct for the general case. I am currently processing <i>query</i>(section) and <b>query</b>(section) into something like <a href="baseurl?q=query&s=section">query(section)</a> from the output of man -T html -O fragment,man=baseurl where my regex defines query as '[a-z._-]+' and section as '[1-9]p?‘. I know that there may be special cases where this doesn’t work or where the replacement is triggered falsely. And I’m fine with that for my local solution. > mandoc -Thtml is in very (very) wide use. I think the change you > described is likely to result in worse markup in some cases. Thats why I suggested making it an option. > It would > be better to encourage developers to put more effort into creating > high-quality documentation as we do in OpenBSD. And one part of that > involves picking the right file format to write the documentation in. Indeed. Fixing the sources would be the best and most correct solution. I agree that this would require massive support from multiple upstream projects. For myself I have a working local solution and I’ll live with https://man.openbsd.org faithfully displaying the old and broken/semantically incomplete formats. Thanks for your feedback and the observations regarding the root cause. My knowledge of mdoc(7), man(7) and other man formats is still rather limited. -- Mike Fischer
