Thanks for the technical details, Bartosz! One would hope (but should confirm) that link prefixes are treated with the same basic logic as link postfixes/trails, so assuming pre- and post-link trails are enabled, "pre[[target]]post" is all linked, but "pre[[target|linktext]]post" is only linked on "linktext", and intermediate cases can be spelled out as "[[target|pre+target]]post" or "pre[[target|target+post]]".
Overall, it sounds like reasonable default shortcut behavior that can easily be overridden with a fully-specified link. Sounds like a cute small syntax improvement! :) Exactly! On Mon, Oct 15, 2018 at 12:01 PM, Bartosz Dziewoński <[email protected]> wrote: > On 2018-10-15 16:34, Trey Jones wrote: > >> 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. >> > > Sounds like a cute small syntax improvement! :) > > > 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. >> > > There are two things to consider: > > * Linktrails are language-specific. For example, in English, only ASCII > a-z are handled in linktrails, while Polish also allows accented letters > ęóąśłżźćńĘÓĄŚŁŻŹĆŃ. Chinese actually effectively disables linktrails > (disallows everything). This is defined using $linkTrail variables in files > like MessagesEn.php etc. > > * There is also something called "linkprefix", used by e.g. Arabic > (MessagesAr.php uses $linkPrefixExtension = true). I am not sure how this > feature works, but it probably complicates everything a bit. > > -- > Bartosz Dziewoński > > > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
