Fwd: [fpc-devel] bug in fpdoc HTML output - double spacing

Michael Van Canneyt michael at freepascal.org
Mon Nov 8 10:36:28 CET 2010



On Mon, 8 Nov 2010, Graeme Geldenhuys wrote:

> Op 2010-11-08 11:03, Michael Van Canneyt het geskryf:
>>
>> Below is a diff of the lazarus and fpc HTML pages.
>> With the exception of some header and an extra unit, the
>> geneated HTML code is the same. The footer is added by sourceforge.
>
> This gave me an idea and I found the difference, and what causes the problem. As suspected, it has nothing todo with the CSS file. And you were indeed correct, that the general HTML output did not changed. One thing that did however change is shown below.
>
>
> -----------------------------------------------
> $ diff -u -w index.html /home/graemeg/programming/3rdParty/tiOPF2/Docs/html/core/index.html
> --- index.html	2010-11-08 11:25:50.000000000 +0200
> +++ /home/graemeg/programming/3rdParty/tiOPF2/Docs/html/core/index.html	2010-11-08 11:25:24.000000000 +0200
> @@ -1,4 +1,4 @@
> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
>
> -----------------------------------------------
>
> The first file is the one I currently have online for tiOPF. The second file is the newly generated file. The only difference is the version of the HTML, from 4.0 to 4.01.  If I copy the old DOCTYPE line over the new one, then the new one displays correctly in Chrome, Firefox etc... no need to touch the fpdoc.css file or anything else for that matter.
>
> I had no idea the DOCTYPE could do that in web browsers. The reason I never picked that up before, was because I kept comparing HTML pages of classes, and the documentation changed to much between old and new so I couldn't easily see what changed. I then looked for a file that did not really change (irrespective of new class documentation that was added since). Then I spotted the difference.
>
> Well, seeing that it isn't really a bug in fpdoc (well not a obvious HTML generation bug as I first suspected), I guess the only simple fix is then to use Amat idea of forcing the look we want with a tweak to the CSS file. At this point I can't be bothered to go read up on the various DTD files and how they differ between versions. I already waisted way to much of my time on this issue.

Fine.

Let's remember you learned something new today. 
One is never too old to learn.

Michael.



More information about the fpc-devel mailing list