Last modified: 2007-10-02 15:04:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6826 - Extend context link ("pipe trick") syntax to pages with commas in title
Extend context link ("pipe trick") syntax to pages with commas in title
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.7.x
All All
: Normal enhancement with 2 votes (vote)
: ---
Assigned To: Ilmari Karonen
:
: 7489 11530 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-26 19:59 UTC by Ilmari Karonen
Modified: 2007-10-02 15:04 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to extend the pipe trick syntax to titles with commas (1.33 KB, patch)
2006-07-26 20:00 UTC, Ilmari Karonen
Details
New patch, gives priority to parens over comma, more tests (3.94 KB, patch)
2006-07-27 21:24 UTC, Ilmari Karonen
Details

Description Ilmari Karonen 2006-07-26 19:59:33 UTC
As proposed on [[Wikipedia:Village pump (technical)#Why does the "pipe trick"
not work on place names?]], the attached patch makes the pre-save context link
expansion (see [[Help:Pipe trick]]) trigger on commas as well as parentheses. 
This means, in particular, that:

1. [[Foo, Bar|]] will expand to [[Foo, Bar|Foo]], and
2. [[|Foo]] on page named [[Foobar, Baz]] will expand to [[Foo, Baz|Foo]].

Due the expansion being done during the PST, this change will not affect
existing content in any way.  Also, since the "empty pipe" syntax does not
conflict with normal link syntax, users are unlikely to run afoul of this effect
by accident.  That said, there is one case where the new behavior may be
unexpected and perhaps, in some cases, unwanted: the syntax [[Ns:Foo, Bar|]],
which used to expand to [[Ns:Foo, Bar|Foo, Bar]] will after the change expand to
[[Ns:Foo, Bar|Foo]] instead.
Comment 1 Ilmari Karonen 2006-07-26 20:00:32 UTC
Created attachment 2155 [details]
Patch to extend the pipe trick syntax to titles with commas
Comment 2 Filip Maljkovic [Dungodung] 2006-07-26 23:58:04 UTC
(In reply to comment #0)
> Due the expansion being done during the PST, this change will not affect
> existing content in any way.  Also, since the "empty pipe" syntax does not
> conflict with normal link syntax, users are unlikely to run afoul of this effect
> by accident.  That said, there is one case where the new behavior may be
> unexpected and perhaps, in some cases, unwanted: the syntax [[Ns:Foo, Bar|]],
> which used to expand to [[Ns:Foo, Bar|Foo, Bar]] will after the change expand to
> [[Ns:Foo, Bar|Foo]] instead.

Why not just give the priority to colon instead of comma? Of course, if such a
thing is possible.
Comment 3 Ilmari Karonen 2006-07-27 21:24:28 UTC
Created attachment 2157 [details]
New patch, gives priority to parens over comma, more tests

Here's a new patch which uses two regexps to ensure that [[Foo, Bar (baz)|]]
becomes [[Foo, Bar (baz)|Foo, Bar]] and [[Foo (baz), Bar|]] becomes [[Foo
(baz), Bar|Foo]].

I've also made the behavior of the [[|Foo]] and [[Foo|]] syntaxes consistent,
such that, for example, both consider the namespace part of the context.  There
is, however, one notable exception: If the page title is of the form "Foo
(bar), Baz", the link [[|Foobar]] becomes [[Foobar, Baz|Foobar]], _not_ 
[[Foobar (bar), Baz|Foobar]].  I believe this is what most people would expect,
since titles with parens followed by a comma are fairly uncommon.
Comment 4 NE2 2006-08-12 16:57:45 UTC
This looks good. I'd hate to see it die from lack of interest.
Comment 5 Brion Vibber 2006-10-04 17:29:30 UTC
*** Bug 7489 has been marked as a duplicate of this bug. ***
Comment 6 Ilmari Karonen 2006-10-04 21:33:42 UTC
Implemented in r16804.
Comment 7 Brion Vibber 2007-10-02 15:04:59 UTC
*** Bug 11530 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links