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

       Web browser: ---
            Bug ID: 49478
           Summary: Parsoid: Adjacent annotations should be merged where
                    possible
           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: ---

Consider the wikitext:
'''Foo''' bar '''baz'''
=>
<b>Foo</b> bar <b>baz</b>

If we remove " bar " in wikitext we are left with
<b>Foo</b><b>baz</b>
which serialises to
'''Foo''''''baz''' (instead of to more sensible '''Foobaz''')

Previously this has not been a problem as we annotate each of Foo & baz as
name='textStyle/bold' and then the converter only closes the <b> tag when it
sees two characters with non-similar annotations (different name values).

However if we keep that functionality the following case breaks:
<b style="color:red">Red</b><b style="color:blue">Blue</b>

As we only compare name, we would consider those annotations to be the same and
serialise them as one.

The only way around that in VE would be to compare all attributes /except/
data-parsoid (as that will always been different, even for annotations that are
actually mergeable). Having an explicit reference to data-parsoid in VE would
most definitely be a Bad Thing.

Therefore I'm suggesting that Parsoid work out if two annotations are mergeable
and automatically collapse
'''Foo''''''baz''' to '''Foobaz'''

This would also apply to anything else we treat as an annotation (e.g. links)

-- 
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