This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Cranium's profile picture

Wiki Formatting

Started by Cranium, 16 April 2014 - 03:17 PM
Cranium #1
Posted 16 April 2014 - 05:17 PM
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.computercraft.info/wiki/ComputerCraft.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?
MKlegoman357 #2
Posted 16 April 2014 - 08:57 PM
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…
Bomb Bloke #3
Posted 16 April 2014 - 11:15 PM
The linebreaks thing depends on its mood; sometimes it ignores them, sometimes it does not. I'm not sure of the rules.
LoneRangerGuy #4
Posted 19 April 2014 - 02:56 AM
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.