September 28, 2010

mairas mairas
Ant Farmer
22 posts

Pasting source code in wiki?

 

Hi,

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:

http://developer.qt.nokia.com/wiki/Building_PySide_on_Linux [developer.qt.nokia.com]

So, what to do?

I’m adding a proper Wiki engine to my wishlist regarding Qt DevNet… :-)

edit: fixed link / chetankjain

4 replies

September 28, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1481 posts

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 :)

  1. this is a test code with @
  2. QString var("chetankjain@qt.com");

September 28, 2010

mairas mairas
Ant Farmer
22 posts

Thanks, it works. Cumbersome, indeed, but I guess I can live with it for the time being. :-)

September 28, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1481 posts

Yes, I had similar issue here [developer.qt.nokia.com]

my script tags were coming as [removed] … then figured it out :)

December 2, 2010

xsacha xsacha
Lab Rat
517 posts

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.

  1. jav* script :

Changing the ‘*’ to an ‘a’ gets ‘[removed]’, even in a code block.

 Signature 

- Sacha

 
  ‹‹ Newsletters and Feeds      Images in wiki stopped working? ››

You must log in to post a reply. Not a member yet? Register here!