Hi, 2010/1/21 Jack D. Pond <[email protected]>: > MW 1.15.1 (and before) > > Does anyone know what causes this and how to remedy? > > Wiki code only recognizes table commands ("{|", "|-", "|}") when they begin > on a new line. Therefore if your template is using these commands, the > first line of your template MUST be a newline - otherwise the wiki code is > likely to be continued on the line in which it is referenced. > > In the mediawiki article editor, this newline is stripped when it is > re-edited and must be manually reinserted. So if you create a template such > as this (note the necessary preceeding empty new line): > -------- > > {| class="smwtable sortable" > ! Col Hdr 1 > ! Col Hdr 2 > -------- > > When you go in and edit again - even though the preceeding new line had been > saved, it will be removed, and you will need to add it again. Example, > before line reinserted: > > -------- > {| class="smwtable sortable" > ! Col Hdr 1 > ! Col Hdr 2 > -------- > > Any ideas? >
You could circumvent the issue by adding a dummy tag or text on the first line in the template, like <noinclude></noinclude>. That way the first line is no longer empty, doesn't get stripped and should have no further ill side effects. -- Regards, Jean-Marc -- . ___ . @@ // \\ "De Chelonian Mobile" . (_,\/ \_/ \ TortoiseSVN . \ \_/_\_/> The coolest Interface to (Sub)Version Control . /_/ \_\ http://tortoisesvn.net _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
