I am not asking for the code its just general discussion.I want to know that when we paste our code how does it automatically gets the color of code exactly as we copied.

For Example:

cmd = New SqlCommand("select * from student_details", con)

how does it know that the "New" and "SqlCommand" is blue colored and

share|improve this question
    
this might help you: alexgorbatchev.com/SyntaxHighlighter. There's several others out there. I just had that one bookmarked. –  PiZzL3 Apr 18 '11 at 15:30
add comment

migrated from stackoverflow.com Apr 19 '11 at 13:26

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 3 down vote accepted

It uses the google-code-prettify library; see Changes to syntax highlighting

share|improve this answer
add comment

I believe Stack Overflow is using the Google code prettifier.

share|improve this answer
add comment

Questions about stackoverflow should be on on Meta but to answer your question take a look here

Source code syntax highlighting on stackoverflow wmd

share|improve this answer
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .