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

Tim Hogan tim at hoganzoo.com
Sat Sep 8 03:22:42 UTC 2007


I can't figure this one out and I am hoping that someone out there and 
can help me with this.

I have a template called BoxFile that will but the contents into it's 
own window.  Here is the template.

{| width="95%" border="0" cellpadding="0" align="center"
|  style="background:#FFDEAD;" | <font size="-1" 
 >http://www.hoganzoo.com/icons/file-text.png &nbsp;&nbsp;File: 
'''{{{1}}}'''</font>
|-
| style="border: 1px dashed #C8C8DA;" |
<div style="overflow: auto; max-height: 35em;">
<p style="white-space: pre; font-family: monospace;"><font 
size="-1">{{{2}}}</font></p>
</div>
|}

Now, the problem that I am having is when I go to a wiki page and use 
this template like so;

{{BoxFile|/home/testfile|<nowiki>line1
line2
line3
</nowiki>}}

the wiki page correctly displays a box with three lines in it.  But when 
I highlight those three lines, copy them, and then paste them somewhere 
else, like a terminal window or notepad screen I get;

line1line2line3

What happened to the line breaks????

Thanks for any help on this.

Tim






More information about the MediaWiki-l mailing list