colorize

Description

Author

Documentation

This extension is a port of lisppaste's colorizing code. It currently supports syntax highlighting for the following languages:

Basic Lisp

Scheme

Emacs Lisp

Common Lisp

C

C++

Java

Objective C

Erlang

Python

Ruby

Haskell

Unified Context Diff

Cascading Style Sheets (CSS)

Extensible Markup Language (XML)

(Extensible) HyperText Markup Language ((X)HTML)

Colorizing procedures

[procedure](coloring-type-names)

Returns an alist of supported coloring types (recognised languages). The keys of this list are simple symbols which encode the internal name of the colorizer, the values of this list are human-readable strings describing the language.

[procedure](coloring-type-exists? name)

If you don't need to know the name of a coloring type, this is a faster way to check if a given coloring type exists. name is a symbol which encodes the internal name of the coloring type. If the coloring type with that name exists, #t is returned, #f otherwise.

0.2 - Ensured variables were not kept around in coloring type objects from previous invocations of html-colorize.

0.1 - Initial port

License

Copyright (c) 2010-2012 Peter Bex
Copyright (c) 2003-2010 Brian Mastenbrook
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.