jenkins-bot has submitted this change and it was merged.
Change subject: 'typeof' for templates changed in Parsoid, it is 'Transclusion'
now and used to be 'Object/Template'
..
'typeof' for templates changed in Parsoid, it is 'Transclusion' now and used to
be 'Object/Template'
Change-Id: Ia5b826bc1a2a648a8e618642697484000b68bfc2
---
M modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
M modules/ve/test/dm/ve.dm.example.js
2 files changed, 11 insertions(+), 11 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
b/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
index 9e81259..1eb950b 100644
--- a/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
+++ b/modules/ve/dm/nodes/ve.dm.MWTemplateNode.js
@@ -38,7 +38,7 @@
ve.dm.MWTemplateNode.static.matchTagNames = null;
ve.dm.MWTemplateNode.static.matchRdfaTypes = [
- 'mw:Object/Template',
+ 'mw:Transclusion',
// We're interested in all nodes that have mw:Object/Template, even if
they also have other mw:
// types. So we match all mw: types, then use a matchFunction to assert
that mw:Object/Template
// is in there.
@@ -46,7 +46,7 @@
];
ve.dm.MWTemplateNode.static.matchFunction = function ( domElement ) {
- return ve.indexOf( 'mw:Object/Template',
+ return ve.indexOf( 'mw:Transclusion',
( domElement.getAttribute( 'typeof' ) || '' ).split( ' ' )
) !== -1;
};
@@ -86,7 +86,7 @@
span = doc.createElement( 'span' );
// All we need to send back to Parsoid is the original template
marker,
// with a reconstructed data-mw property.
- span.setAttribute( 'typeof', 'mw:Object/Template' );
+ span.setAttribute( 'typeof', 'mw:Transclusion' );
span.setAttribute( 'data-mw', JSON.stringify(
dataElement.attributes.mw ) );
return [ span ];
}
diff --git a/modules/ve/test/dm/ve.dm.example.js
b/modules/ve/test/dm/ve.dm.example.js
index 5955955..663838a 100644
--- a/modules/ve/test/dm/ve.dm.example.js
+++ b/modules/ve/test/dm/ve.dm.example.js
@@ -910,8 +910,8 @@
ve.dm.example.MWInlineImageHtml = '';
ve.dm.example.MWTemplate = {
- 'blockSpan': '',
- 'blockSpanModified': '',
+ 'blockSpan': '',
+ 'blockSpanModified': '',
'blockContent': 'Hello, world!',
'blockData': {
'type': 'mwTemplateBlock',
@@ -938,7 +938,7 @@
'about': '#mwt1',
'data-mw':
'{\"id\":\"mwt1\",\"target\":{\"wt\":\"Test\"},\"params\":{\"1\":{\"wt\":\"Hello,
world!\"}}}',
'data-parsoid':
'{\"tsr\":[18,40],\"src\":\"{{Test|Hello,
world!}}\",\"dsr\":[18,40,null,null]}',
- 'typeof': 'mw:Object/Template'
+ 'typeof': 'mw:Transclusion'
}
},
{
@@ -950,8 +950,8 @@
}
]
},
- 'inlineOpen': '',
- 'inlineOpenModified': '',
+ 'inlineOpen': '',
+ 'inlineOpenModified': '',
'inlineContent': '$1,234.00',
'inlineClose': '',
'inlineData': {
@@ -979,12 +979,12 @@
'about': '#mwt1',
'data-mw':
'{\"id\":\"mwt1\",\"target\":{\"wt\":\"Inline\"},\"params\":{\"1\":{\"wt\":\"1,234\"}}}',
'data-parsoid':
'{\"tsr\":[18,34],\"src\":\"{{Inline|1,234}}\",\"dsr\":[18,34,null,null]}',
- 'typeof': 'mw:Object/Template'
+ 'typeof': 'mw:Transclusion'
}
}
]
},
- 'mixed': 'Foo',
+ 'mixed': 'Foo',
'mixedDataOpen': {
'type': 'mwTemplateInline',
'attributes': {
@@ -1009,7 +1009,7 @@
'values': {
'about': '#mwt1',
'rel': 'mw:WikiLink/Category',
- 'typeof': 'mw:Object/Template',
+ 'typeof': 'mw:Transclusion',
'data-mw':
'{\"id\":\"mwt1\",\"target\":{\"wt\":\"Inline\"},\"params\":{\"1\":{\"wt\":\"5,678\"}}}'
}
},
--
To view, visit https://gerrit.wikimedia.org/r/67169
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5b826bc1a2a648a8e618642697484000b68bfc2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extension