markwatkinson / luminous

Accurate and powerful syntax highlighting library
http://luminous.asgaard.co.uk
GNU Lesser General Public License v2.1
50 stars 5 forks source link

Add an ANSI formatter for output on the console #32

Closed J5lx closed 10 years ago

J5lx commented 10 years ago

To use the ANSI formatter, the 'format' option has to be set to 'ansi'

See it in action at https://bit.ly/luminous-ansi-demo

Features:

Known issues which will be fixed when the conversion to PSR (#31) is finished:

markwatkinson commented 10 years ago

Wow, that video is awesome! Thanks for this.

When you say nested tokens aren't yet supported, is that what I'm seeing in the video when, e.g. the line if (!preg_match('/\.css$/i', $theme)) ends up keeping the text 'css$/i' as black?

J5lx commented 10 years ago

Yes, that’s it. It’s because there’s no possibility to do nested styles or such using ANSI escape sequences. I’ll see how I can solve it, but now the PSR-conversion awaits!