Last modified: 2013-06-21 11:31:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51478, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49478 - Parsoid: Adjacent annotations should be merged where possible
Parsoid: Adjacent annotations should be merged where possible
Status: RESOLVED DUPLICATE of bug 48194
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks: 49873
  Show dependency treegraph
 
Reported: 2013-06-12 11:33 UTC by Ed Sanders
Modified: 2013-06-21 11:31 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ed Sanders 2013-06-12 11:33:21 UTC
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)
Comment 1 Gabriel Wicke 2013-06-12 14:49:35 UTC

*** This bug has been marked as a duplicate of bug 42803 ***
Comment 2 Ed Sanders 2013-06-21 11:31:15 UTC

*** This bug has been marked as a duplicate of bug 48194 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links