Prevent deletion of descriptors from C # code

I have a little problem with the Prettify script, which I am trying to integrate into my website to provide intelligent syntax highlighting of C # code blocks. Everything works fine until I introduce Generics, which are contained in smaller and larger characters. Prettify seems to completely strip them and replace them with a single newline.

Does anyone know how to eliminate this annoying behavior?

+4
source share
2 answers

Although I don't know what the Prettify script does, it seems like <and> to confuse the browser because these characters are used to generate html elements.

If you want something to display as <and> in html, you should write & lt; lt; and? (lt = less, gt = more)

+1
source

Use the correct html objects to show <and>;

&lt; and &gt;

0
source

All Articles