[Mediawiki-l] Template help, losing line feeds when coping.

Tim Hogan tim at hoganzoo.com
Tue Sep 11 11:36:28 UTC 2007


Wow, Nice trick!  Not sure I understand it fully, ant I had to remove 
the trailing </pre> from the code :) but I works great.  The finial pice 
of code that I ended up with is

| {{{PRE|<pre}}} style="border:0; overflow:auto;
max-height:35em;">{{{1}}}
|}


Correct?

Tim

Platonides wrote:
> Tim Hogan wrote:
>   
>> The <pre> tag is a good start.  I have played around with that a little 
>> and came up with this;
>>
>> <br />
>> {| width="95%" border="0" cellpadding="0" cellspacing="0" align="center"
>> |- style="background: #DDDDFF;"
>> | http://www.hoganzoo.com/icons/file-text.png &nbsp;&nbsp;'''Source Code:'''
>> |- 
>> | <pre style="border:0; overflow:auto; max-height:35em;">....example text here...
>> .... example text here....
>> </pre>
>> |}
>>
>> It works pretty much that way that I would like but I don't seem to be 
>> able to turn this into a template.  I think what is happening is that 
>> the {{{1}}} variable does not like being inside the <pre> </pre> tags.  
>> Any way around that?
>>
>> Getting closer though :)
>>
>> Tim
>>     
>
>
> Yes, pre doesn't seem to like template parameters, which is probably a 
> bug. The following code workarounds it:
>
> <br />
> {| width="95%" border="0" cellpadding="0" cellspacing="0" align="center"
> |- style="background: #DDDDFF;"
> | http://www.hoganzoo.com/icons/file-text.png &nbsp;&nbsp;'''Source Code:'''
> |-
> | {{{PRE|<pre}}} style="border:0; overflow:auto; 
> max-height:35em;">....example text here... {{{1}}} .... example text 
> here....
> </pre>
> |}
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>   



More information about the MediaWiki-l mailing list