https://bugzilla.wikimedia.org/show_bug.cgi?id=49484

       Web browser: ---
            Bug ID: 49484
           Summary: Remove mw:ExtLink/URL type and automatically switch
                    between serialization variants
           Product: Parsoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

We currently mark up auto-linked external links (source http://example.com/) as
mw:ExtLink/URL (see
http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#External_links for the
spec). There is however no need to distinguish between plain external and
auto-linked external URLs on the client side if we automatically convert
between the two forms as needed. So we should replace all uses of
mw:ExtLink/URL with a plain mw:ExtLink and add some extra info to data-parsoid
and cleverness to our serializer.

Basically:

* If the target and the link text agree, we can serialize a modified or new
link as an URL link in wikitext.
* If a former URL link's content text is modified by the editor and does not
match the target any more, convert to a regular external link.
* If an unmodified external link *could* be rendered as an URL link, but is
marked up as a full external link in the original Wikitext, then preserve this
non-minimal serialization on round-trip.

Change detection requires custom shadowing similar to the logic we use for
WikiLinks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to