Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: bin/
Date: Sun, 12 Jan 2020 09:23:18
Message-Id: 1578820886.da17f1301a5e7c5f9cfa6fa1d202ae78c8f6bb3b.ulm@gentoo
1 commit: da17f1301a5e7c5f9cfa6fa1d202ae78c8f6bb3b
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 10 00:33:51 2020 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 12 09:21:26 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=da17f130
7
8 bin/gen-eclass-html.sh: More man2html postprocessing.
9
10 Remove all links containing "${", because most likely these are
11 instances of SRC_URI containing a variable reference.
12
13 Remove <TT> since it is no longer valid in HTML5. man2html only
14 outputs this pair of tags (with a sequence of non-breaking spaces
15 inside) when it encounters a tab character in its input. Neither
16 <code> nor any other logical markup would be a good replacement,
17 so simply remove it.
18
19 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
20
21 bin/gen-eclass-html.sh | 4 +++-
22 1 file changed, 3 insertions(+), 1 deletion(-)
23
24 diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
25 index 7d3d2ba..2234926 100755
26 --- a/bin/gen-eclass-html.sh
27 +++ b/bin/gen-eclass-html.sh
28 @@ -105,11 +105,13 @@ for i in $(/usr/bin/qlist eclass-manpages) /usr/share/man/man5/ebuild.5*; do
29 # rebuild the man page each time
30 echo -n "${HEADER//@TITLE@/${BASENAME}}" > "${FINAL}"
31 # generate html pages and fix hyperlinks for eclass and ebuild man pages
32 - ${DECOMPRESS} "${i}" | /usr/bin/man2html -r - \
33 + ${DECOMPRESS} "${i}" | /usr/bin/man2html -r \
34 | sed -e '1,/<BODY>/d;/<\/BODY>/,$d' \
35 -e '/<A HREF=/s:"\.\./man5/\([^"]*eclass\|ebuild\)\.5\.html":"../\1/index.html":g' \
36 -e 's:<A HREF="\.\./man[^"]*">\([^<>]*\)</A>:\1:g' \
37 -e 's:<A HREF="[^"]*//localhost/[^"]*">\([^<>]*\)</A>:\1:g' \
38 + -e 's:<A HREF="[^"]*\${[^"]*">\([^<>]*\)</A>:\1:g' \
39 + -e 's:<TT>\([^<>]*\)</TT>:\1:g' \
40 >> "${FINAL}"
41 echo -n "${FOOTER}" >> "${FINAL}"
42 done