Pasting source code in wiki?
what’s the proper syntax for pasting source code to Wiki pages? The WikiHelp page instructs you to use at characters to wrap code but that breaks horribly if the code has any at characters in itself (the character apparently is parsed anywhere, not just on an empty line).
Alternatively, the linked Textile cheat sheet promotes the use of pre tags to wrap code but that appears to break even more horribly. If I try to do that, only the latter of my code snippets is shown, with all the text in the first one and between them being discarded silently.
See this page:
So, what to do?
I’m adding a proper Wiki engine to my wishlist regarding Qt DevNet… :-)
edit: fixed link / chetankjain
Well currently the only way to do that would be to use & #64; …. of course without spaces, a bit cumbersome, but I’m hoping something that will be fixed soon :)
- this is a test code with @
- QString var("firstname.lastname@example.org");
Yes, I had similar issue here [developer.qt.nokia.com]
my script tags were coming as [removed] … then figured it out :)
Rather than removing scripts, could they instead have the code formatting attached to them?
I wanted to use ‘[removed]’ example in a line and got a nasty [removed] too.
Edit: Oh, wow. I thought if I separated the colon and the words it would be fine.
- jav* script :
Changing the ‘*’ to an ‘a’ gets ‘[removed]’, even in a code block.