I'm not sure how much impact it would have on existing link specifications to make the change, but I think MGChecker has a good solution. The "[[target|linktext]]extra" format allows you to specify exactly what part of the text should have a link, while "[[target]]extra" would be understood as a shortcut to "[[target|targetextra]]". This solves the linktrails problem without introducing any extra tags or using nowiki in weird ways.
Looking at some examples in this thread:
- [[Schnee]]<nowiki />reichtum would be [[Schnee|Schnee]]reichtum - [[Gesetz]]e and [[Finger]]s are fine - [[Heimat]]losigkeit is fine - [[absorpsjon]]s[[Spektrallinje|linjene]] might work as intended, but if the middle "s" isn't supposed to be linked then [[Absorpsjon| absorpsjon]]s[[Spektrallinje|linjene]] would do the trick - ma[[Øssur Havgrímsson|ge]]<nowiki/>e[[Øssur Havgrímsson|evner og]] is still something of a mystery, but ma[[Øssur Havgrímsson|ge]]e[[Øssur Havgrímsson|evner og]] would probably do what is intended - [[Alexander Kielland]]<nowiki/>s would be [[Alexander Kielland|Alexander Kielland]]s - [[De forente nasjoner|FN]]s would be fine
This isn't really about <nowiki> anymore—sorry Amir!—but I think it could solve the linktrails syntax issue. The problem, as I alluded to earlier, is what changing the syntax would do to existing links. Though it would be possible to automatically convert existing "[[target|linktext]]extra" to " [[target|linktextextra]]" if target and linktext are different, or " [[target]]extra" if target and linktext are the same (possibly modulo whatever minor differences are allowed, like upper/lowercase—though there are rare instances of articles that differ only by upper/lowercase).
Are their any other linktrails setting other than off and on? We'd want to make sure any changes didn't do weird things to Chinese or other spaceless languages.
—Trey
Trey Jones Sr. Software Engineer, Search Platform Wikimedia Foundation
On Sat, Oct 13, 2018 at 9:29 PM, MGChecker hgasuser@gmail.com wrote:
MZMcBrider wrote: I'm not sure I understand. I would expect a link trail with
"[[Examples|Example]]s" since there is a link trail with "[[Example]]s".
I'm not sure why anyone would associate link trail behavior with the
presence or lack of a pipe character. The defining characteristic of link trails is text being adjacent to "]]", as far as I know.
Yeah, currently there is a link trail with "[[Example]]s", but I neither consider this intuitive nor helpful. If I specify target and link text separately, why would I want a link trail? I could write it as part of the target instead. I think for most people writing something like [[Examples|Example]]s is the first thing they try to avoid link trails. In my opinion, link trailing doesn't make anything easier if target and link text are specified separately. To be clear: I propose to change the current parser behavior to avoid unwanted link trails.
Is the particular case you mention common? It seems like it would be
much more common for a user to simply write "[[Examples]]" currently to achieve the same output.
As the case I mentioned shouldn't be common and clearly more complicated as needed, I think a behavior change wouldn't have that much impact.
Regards, MGChecker
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l