Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/chjj/highlighter.js
- Owner: chjj
- License: mit
- Created: 2011-05-08T13:18:11.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-05-08T13:18:45.000Z (over 13 years ago)
- Last Synced: 2024-10-20T01:14:50.222Z (24 days ago)
- Language: JavaScript
- Homepage:
- Size: 85.9 KB
- Stars: 10
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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()) + '
';