Documentation
¶
Overview ¶
Command linktext finds links whose text says nothing about where they go, and either flags or fixes them.
linktext < page.html # report only linktext -flag < page.html > out.html # mark them in the document linktext -fix page.html > out.html # rewrite the text
The three modes exist because of one constraint, which is worth naming rather than working around quietly: whether a link's text is generic is not known until the link's closing tag, and by then the only thing that can still be done is to insert content. An attribute cannot be set on an element whose end tag has already arrived, and the element's content cannot be replaced either.
So -flag inserts a marker after the link, which the end tag allows, and -fix reads the document twice: once to decide, once to rewrite. Reporting needs neither.
Click to show internal directories.
Click to hide internal directories.