As noted before, to post code in WordPress, I use the ig:Syntax Hiliter plugin. It uses the GeSHi engine.
I recently decided to modify the way it colors C# code. In particular I wanted to separate XML style comments from regular comments.
To that end I modified the PHP code in GeSHi's C# file.
I changed following entry in the $language_data = array ( from:
to
The /// has to come before the // so it can properly recognize the /// otherwise it sees it as another //.
Then I modified the following entry in 'STYLES' => array( to be like this:
-
1 => 'color: #808080',
-
2 => 'color: #008080; font-style: italic;',
-
3 => 'color: #008080;',
-
'MULTI' => 'color: #008080; font-style: italic;'
-
),
2 => is what it orginaly had as 1 =>, and I made 1 => to reflect the change I wanted there, which gives the XML style comments a gray color, while leaving regular comments green.


