My favorites | Sign in
Project Home Downloads Wiki Source
Search
for
Brushes  
Brushes.
Documentation
Updated Feb 4, 2010 by alex.gor...@gmail.com

Brushes

What are they?

Brushes, is a term I made up to call highlighters scripts for individual languages. SyntaxHighlighter uses modular approach and consists of core library shCore.js and a number of brushes which look like shBrushXml.js, shBrushCss.js and so on.

How do they work?

Each brush describes a set of rules for a particular language. These rules are based on keywords, regular expressions and CSS styles. Most languages follow the same syntax and are parsed in the same way as long as you provider some basic rules for parsing strings, comments and so on.

Alternatively, you can write a completely custom brush and implement your own parsing. An example of such brush is shBrushXml.js. It provides formatting for XML/HTML code which doesn't follow same style as say C# or Java does.

Comment by bboy.mr....@gmail.com, Mar 6, 2008

i coded a script for bash support, the file is here: http://bboy.mr.freeze.googlepages.com/shBrushBash.js

Comment by jason...@gmail.com, Mar 23, 2008

Typo there, top reference to shBrushXml.js should read shBrushJScript.sh

Comment by loretopa...@gmail.com, May 31, 2008

I'm starting to brushing a new highlighter for Erlang language :)


Sign in to add a comment
Powered by Google Project Hosting