1

Possible Duplicate:
Syntax highlighting code with Javascript

I have noticed that Stack Overflow uses some sort of script to colorize any code posted in questions and answers to try and mimic what it would look like in an IDE as much as possible. Is this script available for us to use? Where can I find it?

Alternatives to SO's script are welcome.

Implementation

Wow, I got prettify working in under 15 minutes without a problem. Thanks guys! Check out my implementation of it if you care.

Community
  • 1
  • 1
CatDadCode
  • 58,507
  • 61
  • 212
  • 318
  • It's called a **syntax highlighter**. –  Mar 21 '11 at 07:15
  • Thank you. I am sorry for the duplicate. Did not include the word "syntax" in my searches for questions like this or I probably would have found it. – CatDadCode Mar 21 '11 at 07:19

2 Answers2

1

You're looking for a Syntax Highlighter.

I've used this one in the past: http://alexgorbatchev.com/SyntaxHighlighter/

Mark Brown
  • 12,026
  • 8
  • 27
  • 32
0

There are a few js libraries around, have a look at http://www.webdesignbooth.com/9-useful-javascript-syntax-highlighting-scripts/

CyberDude
  • 8,541
  • 5
  • 29
  • 47