BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394243 )

Change subject: Add figure-inline transformation
......................................................................

Add figure-inline transformation

Parsoid is going to change some img wrapper DOM elements from span to
figure-inline. This means we probably want to do the same DOM
transformations we do for spans to also the new, made-up figure-inline
tag.

TODO: Once it's live we'll have to update the expected diff
test results.

Change-Id: I45e54cc54c784eac2a215d6c84b1d3d19da1d8f5
---
M lib/transforms.js
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/43/394243/1

diff --git a/lib/transforms.js b/lib/transforms.js
index fae122c..341360f 100644
--- a/lib/transforms.js
+++ b/lib/transforms.js
@@ -201,8 +201,10 @@
     _rmAttributes(doc, 'li', ['about']);
     _rmAttributes(doc, 'img', ['about', 'alt', 'data-file-height', 
'data-file-width',
         'resource']);
-    _rmAttributes(doc, 'span', ['about', 'data-file-type', 'data-mw', 
'itemscope',
-        'itemtype', 'lang', 'rel', 'title', 'typeof']);
+    const figureInlineAttributes = ['about', 'data-file-type', 'data-mw', 
'itemscope',
+        'itemtype', 'lang', 'rel', 'title', 'typeof'];
+    _rmAttributes(doc, 'figure-inline', figureInlineAttributes);
+    _rmAttributes(doc, 'span', figureInlineAttributes);
 
     _rmMwIdAttributes(doc, 'a[href]');
     _rmMwIdAttributes(doc, 'b');

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45e54cc54c784eac2a215d6c84b1d3d19da1d8f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND <[email protected]>

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

Reply via email to