Re: [PEPr] +1 for Text::Text_Highlighter

From: Date: Mon, 24 May 2004 02:12:20 +0000
Subject: Re: [PEPr] +1 for Text::Text_Highlighter
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29596@lists.php.net to get a copy of this message
Pepr wrote:
Greg Beaver (http://pear.php.net/user/cellog) has voted +1 on the proposal for Text::Text_Highlighter. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=72 Vote information: http://pear.php.net/pepr/pepr-vote-show.php?id=72&handle=cellog This vote is conditional. The condition is: Great package The only problem is that it will not be able to do cross-referencing the way phpDocumentor does it, as it must also be possible to know the current code syntax to do this. Perhaps in the future, a plugin system could be designed that allows an external parser/tokenizer to pass tokens into the highlighter? That's my only condition - if the highlighting callback took 2 arguments, the token, and what text should be highlighted as if it were the token, then we would be in business.
Greg, I have re-read your post, and now I think I misunderstood you initially. Do you want highlighter to be used as a plugin for external parser/tokenizer, so that parser does all the job, and the highlighter just outputs the tokens? If so, what is the need to use the highlighter class if almost all of its functionality will be unused? I was thinking about this kind of plugin system: as soon as the highlighter finds a text that must be highlighted, it calls plugin function which can: - return the text unchanged - change color - pre-format the output, so the highlighter would not apply
    its own formatting
-- Andrey Demenev aka Blindman demenev@on-line.jar.ru

« previous php.pear.dev (#29596) next »