Skip to content

Syntax Highlighting

September 29, 2023
October 8, 2015

Implementing a Syntax-Highlighting JavaScript Editor In JavaScript
http://codemirror.net/doc/manual.html#modeapi
https://github.com/codemirror/CodeMirror/blob/master/mode/gfm/gfm.js
https://github.com/espadrine/ace2cm

http://ace.c9.io/#nav=higlighter

Prism

Small, custom grammars, web workers

Prism
PrismJS/prism: Lightweight, robust, elegant syntax highlighting.

Introducing Prism: An awesome new syntax highlighter | Lea Verou

Shiki

TextMate grammars, VS Code themes

Shiki
shikijs/shiki: A beautiful Syntax Highlighter.

Monarch

VS Code's core

Monaco Editor Monarch

Hightlight.js

highlight.js

highlight.js demo demos both language and style
Language definition guide — highlight.js documentation

Google Code Prettify

google/code-prettify: Automatically exported from code.google.com/p/google-code-prettify
code-prettify/getting_started.md at master · google/code-prettify

code-prettify/src at master · google/code-prettify languages

Prettify Themes Gallery
Color themes for Google Code Prettify

Hexo 优化之使用 Google Prettify 高亮代码 | 柳志超博客

SyntaxHighlighter

SyntaxHighlighter
SyntaxHighlighter dead

Rainbow

Rainbow - Javascript Code Syntax Highlighting
ccampbell/rainbow: Simple syntax highlighting library written in javascript