开发者

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 &lt; and &gt; (lt = less than, gt = greater than)


Use the correct html entities to show < and >;

&lt; and &gt;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜