Date: Wed, 18 Jan 2012 18:13:48 -0700 (MST) From: Warren Block <wblock@wonkity.com> To: Hiroki Sato <hrs@FreeBSD.org> Cc: freebsd-doc@FreeBSD.org Subject: Re: Tidy and HTML tab spacing Message-ID: <alpine.BSF.2.00.1201181748230.42380@wonkity.com> In-Reply-To: <20120119.084434.926306642968660094.hrs@allbsd.org> References: <alpine.BSF.2.00.1201181255210.39534@wonkity.com> <alpine.BSF.2.00.1201181520140.40712@wonkity.com> <20120119.084434.926306642968660094.hrs@allbsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Jan 2012, Hiroki Sato wrote: > Warren Block <wblock@wonkity.com> wrote > in <alpine.BSF.2.00.1201181520140.40712@wonkity.com>: > > wb> HTML versions of FreeBSD documents are fed through tidy (www/tidy or > wb> www/tidy-devel) for cleanup. There's a bug in tidy[1] that can cause > wb> tab stops to be wrong: > wb> http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#AEN1623 > wb> > wb> Note how DISTNAME and EXTRACT_SUFX do not line up. They are correct > wb> in the source book.sgml. > wb> > wb> So what to do? > > I lean to fixing Tidy if possible. The reason why we are using Tidy > is to fix mark-ups in rendered results from various tools like Jade, > not (only) for human-readability. The results of Tidy are still not > perfect from viewpoint of standard conformance, but it is better than > nothing even if most of modern www browsers can handle the rendered > HTMLs directly. Agreed. > wb> 4. Add newlines to the HTML in the build process before it gets to > wb> tidy: > wb> s/CLASS="PROGRAMLISTING"\n>/CLASS="PROGRAMLISTING">\n/ > > I think this will break the results because a newline just after ">" > is recognized as CDATA. A test run on the Porter's Handbook did seem to work: make -C /usr/ports/www/tidy-devel deinstall make clean book.html perl -0777 -i -pe 's/CLASS="PROGRAMLISTING"\n\>/CLASS="PROGRAMLISTING"\>\n/g' book.html make -C /usr/ports/www/tidy-devel install clean tidy -wrap 90 -m -raw -preserve -f /dev/null -asxml book.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1201181748230.42380>