jenkins-bot has submitted this change and it was merged.
Change subject: Get rid of mw-figcaption class (Parsoid does not use it anymore)
......................................................................
Get rid of mw-figcaption class (Parsoid does not use it anymore)
Change-Id: Id4aed15b7db6a3a42bb75637c3d31b52677a8a4d
---
M modules/ve/dm/nodes/ve.dm.MWImageCaptionNode.js
M modules/ve/test/dm/ve.dm.mwExample.js
2 files changed, 3 insertions(+), 8 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/dm/nodes/ve.dm.MWImageCaptionNode.js
b/modules/ve/dm/nodes/ve.dm.MWImageCaptionNode.js
index 91477f2..d86138f 100644
--- a/modules/ve/dm/nodes/ve.dm.MWImageCaptionNode.js
+++ b/modules/ve/dm/nodes/ve.dm.MWImageCaptionNode.js
@@ -33,12 +33,7 @@
};
ve.dm.MWImageCaptionNode.static.toDomElements = function ( dataElement, doc ) {
- // TODO: Parsoid requires figcaption tag to have class mw-figcaption
set in order to be
- // serialized correctly, however this is going to change in the future
and then this code can
- // be simplified.
- var figcaption = doc.createElement( 'figcaption' );
- figcaption.setAttribute( 'class', 'mw-figcaption' );
- return [ figcaption ];
+ return [ doc.createElement( 'figcaption' ) ];
};
/* Registration */
diff --git a/modules/ve/test/dm/ve.dm.mwExample.js
b/modules/ve/test/dm/ve.dm.mwExample.js
index 480d968..bcadd1c 100644
--- a/modules/ve/test/dm/ve.dm.mwExample.js
+++ b/modules/ve/test/dm/ve.dm.mwExample.js
@@ -946,7 +946,7 @@
]
},
'thumb image': {
- 'html': '<body><figure typeof="mw:Image/Thumb"
class="mw-halign-right"><a href="Foo"><img src="Bar" width="1" height="2"
resource="FooBar"></a><figcaption
class="mw-figcaption">abc</figcaption></figure></body>',
+ 'html': '<body><figure typeof="mw:Image/Thumb"
class="mw-halign-right"><a href="Foo"><img src="Bar" width="1" height="2"
resource="FooBar"></a><figcaption>abc</figcaption></figure></body>',
'data': [
{
'type': 'mwBlockImage',
@@ -972,7 +972,7 @@
]
},
'attribute preservation does not crash due to text node split': {
- 'html': '<body><figure typeof="mw:Image/Thumb"
data-parsoid="{}"><a href="Foo" data-parsoid="{}"><img src="Bar" width="1"
height="2" resource="FooBar" data-parsoid="{}"></a><figcaption
class="mw-figcaption" data-parsoid="{}"> foo <a rel="mw:WikiLink" href="./Bar"
data-parsoid="{}">bar</a> baz</figcaption></figure></body>',
+ 'html': '<body><figure typeof="mw:Image/Thumb"
data-parsoid="{}"><a href="Foo" data-parsoid="{}"><img src="Bar" width="1"
height="2" resource="FooBar" data-parsoid="{}"></a><figcaption
data-parsoid="{}"> foo <a rel="mw:WikiLink" href="./Bar"
data-parsoid="{}">bar</a> baz</figcaption></figure></body>',
'data': [
{
'type': 'mwBlockImage',
--
To view, visit https://gerrit.wikimedia.org/r/70934
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id4aed15b7db6a3a42bb75637c3d31b52677a8a4d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Inez <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits