I am using google-code-prettify to syntax-highlight CPP code. I used it as follows.
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?lang=cpp"></script> <pre class="prettyprint"><code> #include <iostream> using namespace std; int main(){ cout << "Hellow world!" << endl; return 0; } </code> </pre>
#include using namespace std; int main(){ cout << "Hellow world!" << endl; return 0; }
I tried other codes in between "<" and ">". They were removed too. Why is this so? How do I get the whole code?
Thanks for your help BR //Asmelash Tse.
This is because it gets interpreted as a HTML tag. If you want them not to be replace
< with <
> with >
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.