Last modified: 2014-04-28 22:28:04 UTC
Take a two-word link (e.g. [[Example link]]). Use the VE inspector to select "Example" and press the remove-formatting button. Repeat with "link". Now the text is "Example <a href='...'> </a> link", which is illegal wikitext, and renders as if there's no link there.
Mass-moving items into VisualEditor product
(In reply to comment #0) > "Example <a href='...'> </a> link", which is illegal wikitext. ... because [[Foo| ]] will trigger the pipe-trick and turn it into [[Foo|Foo]].
(In reply to comment #2) > (In reply to comment #0) > > "Example <a href='...'> </a> link", which is illegal wikitext. > > ... because [[Foo| ]] will trigger the pipe-trick and turn it into [[Foo|Foo]]. Actually, it doesn't (current master, not using Tidy). <pre> * [[Foo]] * [[Foo|]] * [[Foo| ]] * [[Foo|<nowiki></nowiki>]] * [[Foo|<nowiki> </nowiki>]] </pre> Expands to: * [[Foo]] * [[Foo|Foo]] * [[Foo| ]] * [[Foo|<nowiki></nowiki>]] * [[Foo|<nowiki> </nowiki>]] Renders as: <ul><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo">Foo</a> </li><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo">Foo</a> </li><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo"> </a> </li><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo"></a> </li><li> <a href="/wm-git/mediawiki/alpha/index.php/Foo" title="Foo"> </a> </li></ul> Which means a loose space works, and with <nowiki> it even works when empty. Good news :)
<a> </a> doesn't actually render as a clickable link in Firefox. Even if you set text-decoration:underline; on it, it still doesn't render and can't be clicked. However, <a> </a> does behave "correctly". We probably shouldn't allow users to create whitespace-only links, because they don't render correctly in HTML let alone wikitext. I'm going to work on a change that strips whitespace-only links in the converter.
(In reply to comment #4) > We probably shouldn't allow users to create whitespace-only links, because > they > don't render correctly in HTML let alone wikitext. I'm going to work on a > change that strips whitespace-only links in the converter. This part depends on bug 46464.
Pulling from this milestone as it's a lot of work for a small feature.
Change 74084 had a related patch set uploaded by Catrope: [WIP] Unwrap whitespace-only links https://gerrit.wikimedia.org/r/74084
I don't know if it is related to this bug, but it is no longer possible to select only part of a link. Previously you could unlink the second word separately for example. See also bug 51531 and bug 50945
*** Bug 51877 has been marked as a duplicate of this bug. ***
Just FYI, we have a user at en.wp stating <<I was going to give examples of what turns out to be bug 37835. As the bug is a year old, looks like this won't be fixed and therefore no use in giving the examples.>> :/
*** Bug 54266 has been marked as a duplicate of this bug. ***