Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Syntax Highlighting CSS in PHP

I have a CSS parser thats printing out stylesheet to the browser like so:

$cssParser->parse( 'style.css' );
echo '<pre>'; print_r( $cssParser ); echo '</pre>';

Can I 'syntax highlight' the output CSS somehow?

Thanks

like image 998
eozzy Avatar asked Aug 08 '26 20:08

eozzy


2 Answers

If you want to code-highlight something using PHP, getting some HTML code as output, GeSHi - Generic Syntax Highlighter is a nice solution (used by many software, should I add), that supports lots of languages -- and CSS seems to be one of those.

If you want to try it without integrating it into your application first, there is a demo page available, btw.

like image 156
Pascal MARTIN Avatar answered Aug 10 '26 13:08

Pascal MARTIN


Hyperlight? (download from svn at http://code.google.com/p/hyperlight/source/browse/trunk/)

PHP syntax highlighting?

like image 34
Stobor Avatar answered Aug 10 '26 12:08

Stobor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!