commit:     da17f1301a5e7c5f9cfa6fa1d202ae78c8f6bb3b
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 10 00:33:51 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 12 09:21:26 2020 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=da17f130

bin/gen-eclass-html.sh: More man2html postprocessing.

Remove all links containing "${", because most likely these are
instances of SRC_URI containing a variable reference.

Remove <TT> since it is no longer valid in HTML5. man2html only
outputs this pair of tags (with a sequence of non-breaking spaces
inside) when it encounters a tab character in its input. Neither
<code> nor any other logical markup would be a good replacement,
so simply remove it.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/gen-eclass-html.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 7d3d2ba..2234926 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -105,11 +105,13 @@ for i in $(/usr/bin/qlist eclass-manpages) 
/usr/share/man/man5/ebuild.5*; do
        # rebuild the man page each time
        echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
        # generate html pages and fix hyperlinks for eclass and ebuild man pages
-       ${DECOMPRESS} "${i}" | /usr/bin/man2html -r - \
+       ${DECOMPRESS} "${i}" | /usr/bin/man2html -r \
        | sed -e '1,/<BODY>/d;/<\/BODY>/,$d' \
                -e '/<A 
HREF=/s:"\.\./man5/\([^"]*eclass\|ebuild\)\.5\.html":"../\1/index.html":g' \
                -e 's:<A HREF="\.\./man[^"]*">\([^<>]*\)</A>:\1:g' \
                -e 's:<A HREF="[^"]*//localhost/[^"]*">\([^<>]*\)</A>:\1:g' \
+               -e 's:<A HREF="[^"]*\${[^"]*">\([^<>]*\)</A>:\1:g' \
+               -e 's:<TT>\([^<>]*\)</TT>:\1:g' \
                >> "${FINAL}"
        echo -n "${FOOTER}" >> "${FINAL}"
 done

Reply via email to