Esanders has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/73523


Change subject: HACK: Don't merge adjacent annotations from Parsoid
......................................................................

HACK: Don't merge adjacent annotations from Parsoid

Adjacent annotations should not be merged if they both
originate from Parsoid. This is a hack because this logic
should be in Parsoid, not VE.

Just failing tests for now.

Bug: 49873
Change-Id: If1e23e3039178300d72b1c0c585931417bb603b5
---
M modules/ve-mw/test/dm/ve.dm.mwExample.js
1 file changed, 62 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/23/73523/1

diff --git a/modules/ve-mw/test/dm/ve.dm.mwExample.js 
b/modules/ve-mw/test/dm/ve.dm.mwExample.js
index d343293..61d7aa0 100644
--- a/modules/ve-mw/test/dm/ve.dm.mwExample.js
+++ b/modules/ve-mw/test/dm/ve.dm.mwExample.js
@@ -535,6 +535,68 @@
 ];
 
 ve.dm.mwExample.domToDataCases = {
+       'adjacent annotations': {
+               'html':
+                       '<body>' +
+                               '<b>a</b><b data-parsoid="1">b</b><b>c</b><b 
data-parsoid="2">d</b> ' +
+                               '<b>a</b><b>b</b> ' +
+                               '<b data-parsoid="3">a</b><b 
data-parsoid="4">b</b>' +
+                       '</body>',
+               'data': [
+                       { 'type': 'paragraph', 'internal': { 'generated': 
'wrapper' } },
+                       [ 'a', [ ve.dm.example.bold ] ],
+                       [
+                               'b',
+                               [ {
+                                       'type': 'textStyle/bold',
+                                       'htmlAttributes': [ { 'values': {
+                                               'data-parsoid': '1'
+                                       } } ]
+                               } ]
+                       ],
+                       [ 'c', [ ve.dm.example.bold ] ],
+                       [
+                               'd',
+                               [ {
+                                       'type': 'textStyle/bold',
+                                       'htmlAttributes': [ { 'values': {
+                                               'data-parsoid': '2'
+                                       } } ]
+                               } ]
+                       ],
+                       ' ',
+                       [ 'a', [ ve.dm.example.bold ] ],
+                       [ 'b', [ ve.dm.example.bold ] ],
+                       ' ',
+                       [
+                               'a',
+                               [ {
+                                       'type': 'textStyle/bold',
+                                       'htmlAttributes': [ { 'values': {
+                                               'data-parsoid': '3'
+                                       } } ]
+                               } ]
+                       ],
+                       [
+                               'b',
+                               [ {
+                                       'type': 'textStyle/bold',
+                                       'htmlAttributes': [ { 'values': {
+                                               'data-parsoid': '4'
+                                       } } ]
+                               } ]
+                       ],
+                       { 'type': '/paragraph' },
+                       { 'type': 'internalList' },
+                       { 'type': '/internalList' }
+               ],
+               'normalizedHtml':
+                       '<body>' +
+                               '<b>abcd</b> ' +
+                               '<b>ab</b> ' +
+                               '<b data-parsoid="3">a</b><b 
data-parsoid="4">b</b>' +
+                       '</body>'
+       },
        'mw:Image': {
                'html': '<body><p>' + ve.dm.mwExample.MWInlineImageHtml + 
'</p></body>',
                'data': [

-- 
To view, visit https://gerrit.wikimedia.org/r/73523
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1e23e3039178300d72b1c0c585931417bb603b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to