Version: unspecified
Severity: normal
Description
Details
- Reference
- bz37940
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Catrope | T39940 VisualEditor: Automatically nowiki'ed magic links are shown differently after saving & re-editing round trip | |||
Resolved | Catrope | T47062 VisualEditor: Node API re-write |
Event Timeline
<nowiki>RFC 12234</nowiki> round-trips just fine in Parsoid (try it at http://parsoid.wmflabs.org/_rtform/), so I think this is a VE bug. Guessing the module, please change as needed.
Behaviour
- Enter "RFC 1234" & save; it doesn't auto-nowiki, so you get a page with "RFC 1234" as wikitext which automatically links.
- Edit again in VE; you get a link which you could edit.
- Saving this without changing causes the link to be unchanged (as expected).
- Saving this with a different link doesn't convert
- Enter "<nowiki>RFC 1234</nowiki>" in wikitext editor, save.
- Edit in VE; you get some text link in an alien node.
- Saving this causes the link to be unchanged (as expected).
Fixes for unexpected behaviours above:
- This feels a little odd; should magic links be allowed, or should Parsoid (un?)magically wrap them in <nowiki>s?
- This probably should be alienated in DM.
- If the link won't be alienated (i.e., option 2 is not followed), we'll need to special-case this kind of link and re-generate [[]]s around it (? in DM).
Parsoid HTML+RDFa output for "RFC 1234" as wikitext input is:
<a typeof="mw:ExtLink/RFC" href="//tools.ietfs.org/html/rfc1234" rel="mw:ExtLink/RFC" data-parsoid="{"tsr":[0,8],"dsr":[0,8]}">RFC 1234</a>
https://gerrit.wikimedia.org/r/37496 has a fix for this -- but there is more to be tested and done. Work-in-progress. Feel free to report additional failure test cases here.
(In reply to comment #4)
Behaviour
- Enter "RFC 1234" & save; it doesn't auto-nowiki, so you get a page with
"RFC
1234" as wikitext which automatically links.
- Edit again in VE; you get a link which you could edit.
This is no longer true. The behavior on master is that the link gets alienated.
- Saving this without changing causes the link to be unchanged (as
expected).
- Saving this with a different link doesn't convert
You can't do that, because it's an alien. You can remove it as a unit. Bolding it seems to work too, although there's a different bug that causes text to be cut off there, will investigate.
- Enter "<nowiki>RFC 1234</nowiki>" in wikitext editor, save.
- Edit in VE; you get some text link in an alien node.
- Saving this causes the link to be unchanged (as expected).
Also alienated.
Entering "RFC 2822" into an existing paragraph causes Parsoid to <nowiki> the entire paragraph.
Fixes for unexpected behaviours above:
- This feels a little odd; should magic links be allowed, or should Parsoid
(un?)magically wrap them in <nowiki>s?
It does this now, although the entire paragraph is wrapped.
- This probably should be alienated in DM.
It is now.
- If the link won't be alienated (i.e., option 2 is not followed), we'll
need
to special-case this kind of link and re-generate [[]]s around it (? in DM).
Moot, because we have alienation working.
Closing this bug as WORKSFORME. I saw a few weird issues while testing this, but they seem to be Parsoid serialization bugs not directly related to this bug, and I may have an out-of-date library again.
Not WORKSFORME; we actively did something that made this work (just, we didn't notice at the time). :-)