Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I get karma to fix errors in PEARDOC using the GeSHi highlighter?

0 views
Skip to first unread message

Richard Quadling

unread,
Jan 30, 2009, 6:53:43 AM1/30/09
to PEAR Doc List, PHPdoc List
Hi.

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>
&lt;!-- EN-Revision: 1.16 Maintainer: jane Status: ready --&gt;
</programlisting>

<programlisting>
./scripts/revcheck_pear.php xx &gt; revcheck.html
</programlisting>
and

<programlisting>
&lt;!-- CREDITS: joedoe --&gt;
</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!"

Christian Weiske

unread,
Jan 30, 2009, 7:03:25 AM1/30/09
to php...@lists.php.net, RQua...@googlemail.com
Hello Richard,


> 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

Richard Quadling

unread,
Jan 30, 2009, 7:34:08 AM1/30/09
to Christian Weiske, php...@lists.php.net
2009/1/30 Christian Weiske <cwe...@cweiske.de>:

Thank you.


>
> --
> Regards/Mit freundlichen Grüßen
> Christian Weiske
>

So if there is no role defined, then should there be any highlighting?

Christian Weiske

unread,
Jan 30, 2009, 7:40:33 AM1/30/09
to php...@lists.php.net
Hello Richard,


> >> 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.

0 new messages