[[#foo|]], [[/bar|]] should be equivalent to [[#foo|foo]], [[/bar|bar]] (new use of "pipe trick")
Open, LowPublic

Description

Author: bugzillas+padREMOVETHISdu

Description:
In many cases a link to a named anchor for a section within the current page
would have an anchor text that is the same as the heading of the section. This
would make such links easier to type. Similar is the case with subpages. Note
that the text displayed should not have obfuscations like ".3F." used in the
anchor (e.g. ".3F." should be "?").


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=28730

Details

Reference
bz845
bzimport set Reference to bz845.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Nov 9 2004, 8:20 AM

gangleri wrote:

Just for your information:

If the name of a (sub-) section is repeated, " 2", " 3" ... will be append
to the name of the (transliterated) anchors. See
[[test:User:Gangleri/tests/anchors#dummy 2]]
http://test.wikipedia.org/wiki/User:Gangleri/tests/anchors#dummy_2.

Three other anchors are used in there too:
<font id="á" />á with á as a special character
<div id="5" />5
<font id="6" />6

See [[test:User:Gangleri/tests/anchors#5]]. Works.
See [[test:User:Gangleri/tests/anchors#6]]. Works.
See [[test:User:Gangleri/tests/anchors#á]] translates to
http://test.wikipedia.org/wiki/User:Gangleri/tests/anchors#%C3%A1 and will
not work.
http://test.wikipedia.org/wiki/User:Gangleri/tests/anchors#á with á not
translated would work only if I copy and paste it in my browser (IE).

Regards Reinhardt See also [[bugzilla:670|bug 670]].

0paddu wrote:

Oops! Reinhardt WIEWE seems to have misunderstood what I meant. I'm not worried
about .3F. etc. present in the anchor. What I'm saying is [[#foo?|]] should
produce <a href="#foo.3F." ...>foo?</a> and not <a href="#foo.3F."
...>foo.3F.</a>. Currently [[#foo?|]] does the same as <nowiki>[[#foo?|]]</nowiki>.

mrnobo1024 wrote:

You can already do this for the subpages case. Just add an extra
slash, like /bar/

rowan.collins wrote:

*** Bug 1489 has been marked as a duplicate of this bug. ***

rowan.collins wrote:

[added phrase "pipe trick" to the summary to make this bug more searchable]

gangleri wrote:

Dear friends,

See [[meta:Help:Piped link#Automatic conversion of the wikitext (pipe trick)]]:
"if there is a text in parentheses at the end it will be removed"

Many locations are using a comma as [[Chicago, Illinois]]. [[Chicago,
Illinois|]] does not generate a link.

It should be evaluated:

  • if comma could trigger the "piped trick"
  • if other characters as / should trigger it also
  • if the pipe trick should generate always a link ( now not "simple" titles in

the article namespace as [[New York|]] )

  • if "multiple" pipes should remouve recursively one prefix after the other

Please see
[[Wikipedia talk:Piped link#Pipe trick for additional 50.2C000 titles]]
http://en.wikipedia.org/wiki/Wikipedia_talk:Piped_link#Pipe_trick_for_additional_50.2C000_titles

Additional test cases at [[User:Gangleri/tests/unknown]]

Best regards Reinhardt [[User:gangleri]]

gangleri wrote:

Hallo!

Please see some test examples at
http://jadesukka.homelinux.org:8180/betawiki/Project:Piped_links

The "piped link trick" should work whenever there is an agreement about a
*single* interpretation.

It is questionable if [[Project:FAQ#Q 10|]] - "Project:FAQ#Q 10|" should be
[[Project:FAQ#Q 10|FAQ#Q 10]] - "Project:FAQ#Q 10|FAQ#Q 10" according to the
documentation or not.

Best regards Reinhardt [[user:gangleri]]

rowan.collins wrote:

*** Bug 3003 has been marked as a duplicate of this bug. ***

ui2t5v002 wrote:

"Just add an extra slash, like /bar/"

That's bizarre. Why use two different syntaxes for the same thing?

rowan.collins wrote:

*** Bug 3114 has been marked as a duplicate of this bug. ***

rowan.collins wrote:

Pasting an additional comment from dupe:

This would be only a part of the enhancement. For full usability, full paths
should also be converted, e. g. [[Programming in Ada/Types/Strings|]] should be
converted to [[Programming in Ada/Types/Strings|Strings]].

ui2t5v002 wrote:

(In reply to comment #11)

Pasting an additional comment from dupe:
> e. g. [[Programming in Ada/Types/Strings|]] should be
> converted to [[Programming in Ada/Types/Strings|Strings]].

See also Bug 3058:

Multiple pipes should remove multiple prefixes: [[Foo:Bar:Baz||]] =
[[Foo:Bar:Baz|Baz]]

fantasy wrote:

Is there any chance that this will ever happen?

(In reply to comment #9)

"Just add an extra slash, like /bar/"

That's bizarre. Why use two different syntaxes for the same thing?

Pipe trick substitutes. The trailing / just hides the /.
Quite simply /bar/ stays as /bar/ while [[Foo:Bar|]] becomes [[Foo:Bar|Bar]].

Actually, # is a similar case. Why not go with that and #anchor#.

demon added a comment.Jul 13 2009, 6:39 PM
  • Bug 12285 has been marked as a duplicate of this bug. ***
demon added a comment.Jul 13 2009, 6:41 PM
  • Bug 14734 has been marked as a duplicate of this bug. ***

conrad.irwin wrote:

*** Bug 17675 has been marked as a duplicate of this bug. ***

conrad.irwin wrote:

Fixed in r62076

(In reply to comment #9)

That's bizarre. Why use two different syntaxes for the same thing?

Omegatron, [[/bar] and /bar/ refer to two different pages.

circeus wrote:

So, what IS the status on this? It makes editing of glossary-type pages with heavy internal cross-referencing incredibly tedious, not to mention 90% of the Wiktionary links would benefit from this (especially if the syntax applied to [[foo#bar|]]).

bud0011 wrote:

(In reply to comment #21)

So, what IS the status on this? It makes editing of glossary-type pages with
heavy internal cross-referencing incredibly tedious, not to mention 90% of the
Wiktionary links would benefit from this (especially if the syntax applied to
[[foo#bar|]]).

Apparently... no where yet... :(

Brion has a new parser is under development right now and this enhancement is on his radar for that.

He7d3r added a comment.Aug 7 2012, 3:51 PM

FYI: the new parser is documented on [[mw:Parsoid]].

Meno25 removed a subscriber: Meno25.Feb 22 2016, 5:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 22 2016, 5:48 PM

Add Comment