Looking through the error logs produced using the GeSHi highlighter.
First up was the truly wierd IE error when cutting and pasting
examples - they lost their newlines. This is fixed by adding ...
$geshi->set_header_type(GESHI_HEADER_DIV);
to the highlight method of the PhD_Highlighter_Geshi class.
Next I'm seeing a LOT of E_NOTICES when building peardoc. These relate
to no role for the programlisting tags.
Quick example. In peardoc/en/chapters/faq/documentation.xml ...
<programlisting>
<!-- EN-Revision: 1.16 Maintainer: jane Status: ready -->
</programlisting>
<programlisting>
./scripts/revcheck_pear.php xx > revcheck.html
</programlisting>
and
<programlisting>
<!-- CREDITS: joedoe -->
</programlisting>
will all generate E_NOTICES and not by highlighted.
By adding role="xml" to the first and last example and role="bash" (I
think that's the most appropriate), then the errors are gone and
highlighting is successful.
I have the time to go through these, so some karma would be useful.
I'm NOT intending to make any changes to the wording or anything like
that. Just reduce the build errors.
Richrd.
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
> Looking through the error logs produced using the GeSHi highlighter.
Please keep in mind that this was only an example :)
When we restructured PhD source layout, I'll add it to PhD nevertheless.
> Next I'm seeing a LOT of E_NOTICES when building peardoc. These relate
> to no role for the programlisting tags.
This is only partly a problem of peardoc - phd should not expect that programlistings have a role.
> I have the time to go through these, so some karma would be useful.
You have karma for peardoc now.
--
Regards/Mit freundlichen Grüßen
Christian Weiske
Thank you.
>
> --
> Regards/Mit freundlichen Grüßen
> Christian Weiske
>
So if there is no role defined, then should there be any highlighting?
> >> Next I'm seeing a LOT of E_NOTICES when building peardoc. These relate
> >> to no role for the programlisting tags.
> > This is only partly a problem of peardoc - phd should not expect that programlistings have a role.
> So if there is no role defined, then should there be any highlighting?
That depends on the highlighter. If it has language-guessing capabilities, it might highlight the code. If not, it should return the text at least wrap the text in <pre>, as PhDHighlighter.php does.