Prettify stripping Generics from C# code block
I'm having a slight issue with the Prettify script that I'm trying to integrate into my website to provide intelligent syntax highlighting of C# code blocks. All works fine until I introduce Generics, which are contained within less-than and开发者_Python百科 greater-than characters. Prettify seems to be completely stripping these out and replacing them with a single newline character.
Anyone have any idea how to fix this irritating behavior?
Though I have no idea what the Prettify script does, it sounds like the < and > confuse the browser, because those characters are used to generate html elements.
If you want something rendered as < and > in html, you should write < and > (lt = less than, gt = greater than)
Use the correct html entities to show < and >;
<
and >
精彩评论