C#/.NET library for source code formatting, like the one used by ?


I'm writing command line tool to convert markdown text to html output, which sounds quite easy.

However, I'm thinking how to get good syntax colors for embedded code blocks, such as any used by stack overflow.

Do anyone know either:

  • Is the library stack overflow
  • Or if there is a library that I can easily reuse Can I use it?

Actually it is one of the few "wits" that uses stack overflow, trying the best to use the language in the basically using the right keywords to choose is.

Actually, what I want is for my program, such as to handle the block:

  If the truth (a == 0) comes back is; If (A == 1) wrong return; Sharp Markandow, I'm using the library, by default, outputs as a simple pre / code html block, without any syntax color. 

I want the same types of handling as formatting on stack overflow; blue "return" keywords in the above version are for example. Or, after hmm, after adding the code example after checking the source of this stack overflow page, I know that it is also formatted like a simple pre / code block, whether it works pure javascript magic So, there is probably no such library?

If there is no library that will determine the possible language by the keywords used automatically, will it be something that is clearly said to be this language? Since this is my "Markdown-Commandline-tool", so if I want I can easily add syntax. Ohhh - I completely forgot the fact that you are already using - But she uses is the markdown processor stack overflow.

However, it uses also - and the bit that provides the color, is it the bit you were missing?


Comments

Popular posts from this blog

php - multilevel menu with multilevel array -

c# - TypeConverter in propertygrid only converts from string, not to -

jQuery UI: Datepicker month format -