Description
Related Objects
- Mentioned In
- T128060: VisualEditor makes it easy to create partially linked words, when the user expects a fully linked one
- Mentioned Here
- T35091: Parsoid: Linking on a part of a word triggers linktrail
T53173: <nowiki/> added to wikilinks
T54044: VisualEditor: only a part of word is linked and <nowiki/> is added
T95272: in VisualEditor linking a part of a word to a page with a different title adds an unnecessary nowiki
Event Timeline
Now VisualEditor can do two outputs:
- [[Hatvan|Hatvanban]] – good display, but wrong wikitext. I can achieve this only by inserting the link to Hatvan, writing nban before the last character, and finally deleting the last n; this is not very user-friedly…
- [[Hatvan]]<nowiki />ban – bad display, even wronger wikitext. It can be achieved easily by inserting the link to Hatvan, and then writing ban after it.
That's not an unbalanced tag, it's a self-closing tag, documented at https://www.mediawiki.org/wiki/Help:Formatting#Text_formatting_markup.
This is not a Parsoid issue. Parsoid preserves the semantics of the HTML it received.
[subbu@earth bin] echo '[[Hatvan]]ban' | node parse --prefix huwiki --normalize <p><a href="Hatvan" title="Hatvan">Hatvanban</a></p> [subbu@earth bin] echo '[[Hatvan]]<nowiki/>ban' | node parse --prefix huwiki --normalize <p><a href="Hatvan" title="Hatvan">Hatvan</a>ban</p>
So, Parsoid adds the <nowiki/> so that the wikitext parses to the HTML that it encountered. Without the nowiki, as you can see above, on rendering, the 'ban' also becomes part of the link because of linktrail behavior that is part of wikitext.
So, if in VE, you saw 'Hatvan' linked and ban immediately followed it without any whitespace (or other huwiki-specific chars that prevent linktrail behavior), then the nowiki insertion is the only solution to preserve that rendering.
I am closing this as invalid. Please reopen (or reassign to VE) based on what the expectations are about desired output and whether the VE UI misled the editor in terms of those expectations.