Forum:Persistent unwanted preformatted text

When a page is saved, occasionally a line is transformed into preformatted text. Looking at the source code, it appears that the line has a space preceding it. That space simply pops up there and is sometimes extremely persistent: removing it manually and saving the page again removed the preformat, but the next save is just as likely to revert it back to preformatted text. This even occurs on pages where no preformatted text is used at all. If I had to guess, I would say that it has something to do with tables, because I seem to remember this happening when text is inside a table of some sort (even a simple 1x1 table, but not only). This problem occurs to me and also my co-editor (Jagged Alliance 2 HAM wikia). Headrock 22:37, 30 June 2009 (UTC)


 * Getting text in pre tag when lines start with a space is normal wiki behavior.
 * Not been able to remove the space and save the page correctly must have something to do with the new editor, but you didn't mention using using it, but it's activated by default for new users, i think.
 * Try going to "source mode" or disabling the new editor in your prefs.
 * You could also give us a link to an example page... — TulipVorlax 09:10, 1 July 2009 (UTC)

I use the rich-text editor, but the problem occurs when saving in either mode. The space is unwanted, it appears magically. Removing it manually sometimes solves the problem, and sometimes the preformat reappears immediately after saving.

Here's an example page:. Go to section Calculating the Quantity of Trained Militia. The first line under that heading is preformatted when it shouldn't be. I must've erased the preceding space (in non-rich editor mode) a dozen times in the past, but it keeps coming back. I'm assuming that it has something to do with the table the text is in, because I seem to remember this only happening inside tables, but I'm not 100% sure about that. Also might have something to do with being the first line after a header. Headrock 12:27, 1 July 2009 (UTC)

UPDATE: I've run some tests, and it appears that this has nothing to do with tables. It has to do with Non-header Text immediately following a Header line. The rich-text editor has some flaw that causes them to be written into the source code like so: === Header Text === Non-Header Text

The lack of an empty line between the two of these causes the editor to automatically insert a space before the non-header text, turning it into preformatted text. I believe that the way to manually fix it (and prevent preformatted text from reappearing) is to manually insert an empty line between the two (in source view mode). However, I don't know how to prevent the problem from appearing in the first place, only how to react to it. Headrock 15:27, 1 July 2009 (UTC)


 * Ok, sorry for editing before having fully read in that case.
 * Looking at the code for the whole page, i see a real lot of "useless" empty lines. Or, in the "normal" editor, thoses are useless. If staff can reproduce, i think it's a bug that need to be fixed. — TulipVorlax 17:35, 1 July 2009 (UTC)