User:Wade/Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
==== Table test ====
==== Table test ====

This is an example of the kind of whitespace mistake that the mwlib template expander is making. Note that the colspan="2" bit is on its own line and indented, this is breaking the parser.

Edit this page to see the expanded wikitext.


{|
{|
Line 9: Line 13:
|-
|-
|}
|}

It's supposed to come out like this:


{|
{|
|-
| style="color: red;" | '''Hello!'''
|-
|}

Note that mwlib wouldn't even render the above correctly, attributes on columns were broken, but I have fixed that.

==== A bigger example ====

This is the post-template Infobox that appears at the beginning of '''confederación Perú-Boliviana''' on the wiki server. As you can see, it's massively broken even in the MediaWiki renderer.

{| style="background:transparent; text-align:left; table-layout:auto; border-collapse:collapse; padding:0; font-size:100%;" cellspacing="0" cellpadding="0"
|+ style="margin-left:inherit; font-size:135%; padding-bottom:0.5em; line-height:1.1em;"|
'''Confederación Perú-Boliviana'''<br />'''Confederación Perú-Boliviana'''
|-
|
colspan="2" style="border-top:solid 1px #ccd2d9; padding:0.4em 0 0.4em 0; vertical-align:top; text-align:center;"
|
Confederación

|
-

|colspan="2" style="border-top:solid 1px #ccd2d9"|
{| width=275 style="text-align:center; margin:0 auto; background:none;"
|-
|width=50px style="border:0; vertical-align:middle;"| [[Estado Nor-Peruano|←]][[Imagen:Flag of Peru (1825 - 1950).svg|30px]]<br> [[Estado Sud-Peruano|←]][[Imagen:Flag of South Peru.svg|30px]]<br> [[Bolivia|←]][[Imagen:Bolivien 1826-1851W.svg|30px]]<br>
|style="vertical-align:middle; text-align:center; font-size:105%;" | '''[[1837]]&nbsp;—&nbsp;[[1839]]'''
|width=50px style="border:0; vertical-align:middle;"|
[[Imagen:Flag of Peru (1825 - 1950).svg|30px]] [[República del Perú|→]]<br> [[Imagen:Bolivien 1826-1851W.svg|30px]] [[Bolivia|→]]<br>
|}
|-
| colspan="2" style="text-align:center; border-top:solid 1px #ccd2d9" |
<p>[[Imagen:Flag of the Peru-Bolivian Confederation.svg|220px|Bandera Confederación Perú-Boliviana]] <p> [[Bandera|Bandera]]
|-

|-

|-
|
-

|
colspan="2" style="border-top:solid 1px #ccd2d9; vertical-align:top; text-align:center; font-size:95%; padding:0.4em 0 0.4em 0"
|
[[Imagen:Location ConfederaciónPerú-Boliviana.png|250px|center|Ubicación de Confederación Perú-Boliviana]]<small></small>
|-
|width=50% style="border-top:solid 1px #ccd2d9; padding:0.4em 1em 0.4em 0; vertical-align:top"| '''[[Capital (política)|Capital]]'''
|width=50% style="border-top:solid 1px #ccd2d9; padding:0.4em 1em 0.4em 0; vertical-align:top"| [[Tacna]]
|-

|-

|-

|-
|style="border-top:solid 1px #ccd2d9; padding:0.4em 1em 0 0; vertical-align:top; text-align:left;"| '''[[Forma de gobierno|Gobierno]]'''
|style="border-top:solid 1px #ccd2d9; padding:0.4em 1em 0 0; vertical-align:top;"| [[Confederación]]
|-
|-
|
|
Line 24: Line 89:
|
|
-
-

















|-




|-

|-
|
style="border-top:solid 1px #ccd2d9; padding:0.4em 1em 0 0; vertical-align:top; text-align:left;"
|
'''Historia'''

|
style="border-top:solid 1px #ccd2d9; padding:0.4em 1em 0 0; vertical-align:top;"
|

|
-


|
style="padding:0em 1em 0.2em 0; vertical-align:top"
|
&nbsp;•&nbsp;Establecido
|

|
[[9 de mayo]]&nbsp;de&nbsp;[[1837]]

|
-




|
style="padding:0em 1em 0.2em 0; vertical-align:top"
|
&nbsp;•&nbsp;Disolución
|

|
[[25 de agosto]]&nbsp;de&nbsp;[[1839]]

|
-

|-


|-





|-

|-

|-

|-

|-
|}
|}

Latest revision as of 07:25, 18 May 2008

Table test

This is an example of the kind of whitespace mistake that the mwlib template expander is making. Note that the colspan="2" bit is on its own line and indented, this is breaking the parser.

Edit this page to see the expanded wikitext.

style="color: red;"
Hello!

It's supposed to come out like this:

Hello!

Note that mwlib wouldn't even render the above correctly, attributes on columns were broken, but I have fixed that.

A bigger example

This is the post-template Infobox that appears at the beginning of confederación Perú-Boliviana on the wiki server. As you can see, it's massively broken even in the MediaWiki renderer.

Confederación Perú-Boliviana
Confederación Perú-Boliviana

colspan="2" style="border-top:solid 1px #ccd2d9; padding:0.4em 0 0.4em 0; vertical-align:top; text-align:center;"

Confederación

-

30px
30px
30px
1837 — 1839

30px
30px

220px|Bandera Confederación Perú-Boliviana

Bandera

-

colspan="2" style="border-top:solid 1px #ccd2d9; vertical-align:top; text-align:center; font-size:95%; padding:0.4em 0 0.4em 0" 
250px|center|Ubicación de Confederación Perú-Boliviana
Capital Tacna
Gobierno Confederación
style="padding:0 1em 0.2em 0; text-align:left; vertical-align:top" 
Protector Supremo
style="padding:0 1em 0.2em 0; text-align:left; vertical-align:top" 
Andrés de Santa Cruz

-









style="border-top:solid 1px #ccd2d9; padding:0.4em 1em 0 0; vertical-align:top; text-align:left;" 
Historia
style="border-top:solid 1px #ccd2d9; padding:0.4em 1em 0 0; vertical-align:top;" 


-


style="padding:0em 1em 0.2em 0; vertical-align:top" 
 • Establecido 
9 de mayo de 1837

-



style="padding:0em 1em 0.2em 0; vertical-align:top" 
 • Disolución 
25 de agosto de 1839

-