Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

Whitspace dropped from my template?

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


legalize at xmission

Mar 23, 2012, 9:07 AM

Post #1 of 3 (176 views)
Permalink
Whitspace dropped from my template?

Hi,

I've been creating an infobox derived template:
<http://terminals.classiccmp.org/wiki/index.php/Template:Infobox_terminal>

In certain places in my template, I do things like conditionally include
separators like ", " (comma, space) when multiple values are supplied as
values to my template. In the final rendering on the page that
instantiates the template I get the comma, but not the space.

Here is an example of the template being used where the space was dropped:
<http://terminals.classiccmp.org/wiki/index.php/ADDS_1010>

Notice there is no space between "November," and "1976".

How can I preserve this space in the template expansion?

Thanks!
--
"The Direct3D Graphics Pipeline" -- DirectX 9 version available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


jeremy at tuxmachine

Mar 23, 2012, 11:32 AM

Post #2 of 3 (168 views)
Permalink
Re: Whitspace dropped from my template? [In reply to]

Hi,

On Fri, Mar 23, 2012 at 12:07, Richard <legalize [at] xmission> wrote:
> Here is an example of the template being used where the space was dropped:
> <http://terminals.classiccmp.org/wiki/index.php/ADDS_1010>
>
> Notice there is no space between "November," and "1976".
>
> How can I preserve this space in the template expansion?

How does one create an account on your wiki?

http://terminals.classiccmp.org/wiki/index.php?title=Special:UserLogin&type=signup
says:
> == Permissions errors ==
> You do not have permission to create this user account, for the following reason:
> The action you have requested is limited to users in the group: Administrators.

-Jeremy

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


legalize at xmission

Mar 26, 2012, 10:21 PM

Post #3 of 3 (161 views)
Permalink
Re: Whitspace dropped from my template? [In reply to]

To answer my own question, the whitespace was being consumed because
of the adjacent <noinclude> and <includeonly> style tags. It appears
that there are two ways you could solve this:

1) use &#x20; to get a space that isn't encoded as ' '
2) use <nowiki/> after the space so that the other tags see the
adjacent nowiki tag and not whitespace that they gobble up.

I used #1 and my template expands as expected now.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 version available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.