Proposal for "Text_Highlight"

» Metadata » Status
» Description
An API for implementing highlighting of any code/formatted text. Currently includes PHP, MySQL, XHTML, XSLT, Generic XML, DTD and CSS. The highlighters are easy to "plug-in" to the API, and can all be run standalone also (i.e. if you're highlighting more than one type of code, use the main Text_Highlight class, if you're just highlighting XML, use Text_Highligh_XML::highlight())

All highlighters implement optional line numbering.

This is based on older code of my own, and could do with moving from POSIX to PCRE regex in some of the plugins - I plan to do this before 1.0. The PHP plugin just hacks up highlight_string() output, I want to move that to PHP_Lite and create a new PHP highlighter which will have mouseover documentation of internal functions and will be created using the tokenizer so its nice and valid XHTML output.
» Dependencies » Links
  • XML_Beautifier (optional)
  • PCRE extension
» Timeline » Changelog
  • First Draft: 2004-04-05
  • Proposal: 2004-04-05
  • Call for Votes: 2004-04-12