←  Wiki Discussion

ComputerCraft | Programmable Computers for Minecraft

»

Wiki Formatting

Cranium's Photo Cranium 16 Apr 2014

It looks like formatting does not work well with <code> tags. I'm trying to post an example computercraft.cfg file on the wiki, since there was a link to a blank page, but it seems that no matter what I do, I cannot get it to show properly.

Page for reference: http://www.computerc...mputerCraft.cfg

In the text editor, it looks just fine, but if I decide I want to either remove the formatting, or list it in <code> with <nowiki>, it does not work. What am I doing wrong?
Quote

MKlegoman357's Photo MKlegoman357 16 Apr 2014

Fixed using <pre> tags instead of <nowiki><code>. I think mediawiki ignores newlines which are placed in the editor, but you can place them manually using <br> tags...
Quote

Bomb Bloke's Photo Bomb Bloke 16 Apr 2014

The linebreaks thing depends on its mood; sometimes it ignores them, sometimes it does not. I'm not sure of the rules.
Quote

LoneRangerGuy's Photo LoneRangerGuy 19 Apr 2014

The problem may be in having excessively long comments in the code. If I remember correctly when displaying code MediaWiki will not wrap any text to a new line. The only way around it might be to not put it into a code block and maybe just use a fixed width font or perhaps if it's at all possible to edit the original code to have much shorter comments and put them on multiple lines rather than have a super long comment that won't wrap. In general I find it better to keep all code and comments down to 80 characters if it is at all possible, it keeps things more readable.
Quote