jenkins-bot has submitted this change and it was merged.

Change subject: Fix logic for ignoring (col|row)span=1
......................................................................


Fix logic for ignoring (col|row)span=1

1 should only be kept if the original value was 1 (previously
was just if the original value existed).

This means unmerging a cell doesn't result in (col|row)span=1.

Change-Id: I188755ccd435b21fa9791263aa84ccc89633cd0e
---
M src/dm/nodes/ve.dm.TableCellNode.js
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/dm/nodes/ve.dm.TableCellNode.js 
b/src/dm/nodes/ve.dm.TableCellNode.js
index c9017dc..ed77935 100644
--- a/src/dm/nodes/ve.dm.TableCellNode.js
+++ b/src/dm/nodes/ve.dm.TableCellNode.js
@@ -72,11 +72,11 @@
                attributes = dataElement.attributes;
 
        // Ignore spans of 1 unless they were in the original HTML
-       if ( attributes.colspan === 1 && !attributes.originalColspan ) {
+       if ( attributes.colspan === 1 && attributes.originalColspan !== 1 ) {
                attributes.colspan = null;
        }
 
-       if ( attributes.rowspan === 1 && !attributes.originalRowspan ) {
+       if ( attributes.rowspan === 1 && attributes.originalRowspan !== 1 ) {
                attributes.rowspan = null;
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I188755ccd435b21fa9791263aa84ccc89633cd0e
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to