Firman Wandayandi [2004-04-05 17:42 UTC]Nice, I like about colorizing!
But the keywords need to place at one place e.g. file. So easily for user to update keywords by himself without download or wait new version of package, because keywords always changed over and over.
Alan Knowles [2004-04-05 17:48 UTC]should it be HTML_Highlight_Text ?
Firman Wandayandi [2004-04-05 17:57 UTC]Ah, forgot about that!
How about HTML_SyntaxHighlight or HTML_Highlight?
Jon Parise [2004-04-05 21:29 UTC]This code doesn't follow the conding standards.
$this->highlighter is never actually used.
There's probably better ways to implement highlight() than by using that ugly eval().
In short, the code, as it stands, is a mess.
Stefan Neufeind [2004-04-06 05:12 UTC]First of all, thank you Davey for taking the time to propose this!
I'm missing a highlighter for SQL - but with the existing code this shouldn't be too much of a problem.
How about being able to use CSS instead of direct colors?
And wouldn't maybe a solution which outputs an array of color-markups, e.g. for output to a PDF, instead of writing "between" the code be a good solution? (Though I'm currently unsure about the overhead this introductes.)
Anyway, I'm not sure if the regex-approach is the best solution. Wouldn't a real "parser" (promised to come hopefully soon, by Greg) allow for more reliable or maybe faster markup? I'd love to hear Greg about this.