Don't remove whitespace before [[Category:...]]
Closed, ResolvedPublic

Assigned To
None
Priority
Low
Author
Jidanni
Subscribers
Jidanni, wikibugs-l
Projects
Reference
bz8381
Description

Alas [[Category:Whatever]] eats nearby whitespace.
A shame, as it doesn't need to but it does.
Why can't it just mind its own business, and not tamper with
preceding and following whitespace, if indeed any.

What's the big deal you ask? Well, templates like
[[Category:{{{1}}}]][[:Category:{{{1}}}|{{{1}}}]]<noinclude>...
have no way of restoring those surrounding whitespace conditions,
even with the <noinclude> tacked on before any newline.

Users might start thinking they must now pass the surrounding
whitespace into the template just to protect it.

Same with just [[:Category:{{{1}}}|{{{1}}}]], only a following space
is preserved, not a preceding one.

Would the UNIX m4 preprocessor gobble whitespace like [[Category... ?


Version: 1.7.x
Severity: minor

bzimport added a project: MediaWiki-Parser.Via ConduitNov 21 2014, 9:32 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz8381.
Jidanni created this task.Via LegacyDec 25 2006, 5:30 PM
bzimport added a comment.Via ConduitDec 25 2006, 6:55 PM

ayg wrote:

I think this is so that you don't have ugly whitespace at the end of an article,
but if that were the only reason, why don't we just strip whitespace from the
end of the article instead of from before categories? Maybe I'm wrong.

bzimport added a comment.Via ConduitDec 26 2006, 12:37 PM

webboy wrote:

Try using
[[:Category:{{{1}}}|{{{1}}}]][[Category:{{{1}}}]]
instead of
[[Category:{{{1}}}]][[:Category:{{{1}}}|{{{1}}}]]

bzimport added a comment.Via ConduitJul 31 2007, 3:55 AM

webmaster wrote:

If WebBoy's suggestion fixed it, I suppose we can close this bug.

brion added a comment.Via ConduitDec 5 2007, 8:29 PM
  • Bug 11908 has been marked as a duplicate of this bug. ***
Jidanni added a comment.Via ConduitMay 11 2009, 10:21 PM
  • This bug has been marked as a duplicate of bug 17988 ***

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.