5

Best would be if it performs the highlighting exactly as it is in Visual Studio.

Michal
  • 3,141
  • 5
  • 27
  • 29

2 Answers2

7

If you're using Visual Studio, you can try the Copy Source as HTML plugin.

An non-Visual Studio alternative would be SyntaxHighlighter (more info here)

dylantblack
  • 209
  • 1
  • 6
1

Probably SyntaxHighlighter Evolved, which uses a nice JavaScript (SyntaxHighlighter 2.0) library for highlighting, and you can easily add custom styles.

Anteru
  • 19,042
  • 12
  • 77
  • 121
  • i like that plugin but the only thing which makes it a no-go is: "NOTE: One important thing to watch out for is opening triangular bracket <. It must be replaced with an HTML equivalent of < in all cases. Failure to do won't break the page, but might break the source code displayed. " Code normally contains a lot of brackets (<) and i have no time to encode them manually :( – Michal Jun 25 '09 at 06:50
  • In this case, you can use the editor for SyntaxHighlighter: http://precode.codeplex.com/ – Anteru Jun 25 '09 at 09:44