Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chjj/highlighter.js

a quick and dirty JS highlighter
https://github.com/chjj/highlighter.js

Last synced: 16 days ago
JSON representation

a quick and dirty JS highlighter

Awesome Lists containing this project

README

        

# highlighter.js - a javascript highlighter

a quick and dirty JS highlighter i wrote for displaying code on my site.
all it is, is a simple lexer which iterates through the tokens after
tokenization, buffers the text and adds spans in the appropriate places.
It doesn't assume any environment, so it can be used client or server side.

## Example Usage

return '' + highlight(func.toString()) + '';