This question already has an answer here:
- How do I format my code blocks? 1 answer
If I'm trying to post a question/answer on Stack Overflow, with some code that contains HTML text syntax inside, how do I do it nice with highlights. For example, I would like to post this line:
QString html = QString("<html><head><meta Content=\"Text/html; CHARSET=Windows-1251\"></head><body>%1</body></html>").arg(text);
But output is shown as
QString html = QString("%1").arg(text);.
I have read this post what-html-tags-are-allowed-on-stack-overflow, but I didn't find the answer.