mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-14 18:15:57 +00:00
Pass dataElement type to parent's toDataElement
Ensures the rendering is cached with the correct hash. Bug: T151130 Depends-On: I80e2f2587cff8e9d9fe6ded5d8581263268deaa8 Change-Id: I64466cc342f7ab7f9d4539f935688d167853a662
This commit is contained in:
parent
e08865087c
commit
28b480ca0a
|
@ -37,11 +37,9 @@ ve.dm.MWSyntaxHighlightNode.static.getMatchRdfaTypes = function () {
|
|||
*/
|
||||
ve.dm.MWSyntaxHighlightNode.static.toDataElement = function ( domElements, converter ) {
|
||||
// Parent method
|
||||
var dataElement = ve.dm.MWExtensionNode.static.toDataElement.call( this, domElements, converter ),
|
||||
isInline = this.isHybridInline( domElements, converter ),
|
||||
type = isInline ? 'mwInlineSyntaxHighlight' : 'mwBlockSyntaxHighlight';
|
||||
|
||||
dataElement.type = type;
|
||||
var isInline = this.isHybridInline( domElements, converter ),
|
||||
type = isInline ? 'mwInlineSyntaxHighlight' : 'mwBlockSyntaxHighlight',
|
||||
dataElement = ve.dm.MWExtensionNode.static.toDataElement.call( this, domElements, converter, type );
|
||||
|
||||
return dataElement;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue