mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
ve-cite: Add dependency on ext.visualEditor.mwtransclusion
ReferencesListNode needs to be registered after MWTransclusionNode so that it has a higher specificity when matching. Change-Id: I93610fac2ec9715a14b34efb76abc55d2d2c6900
This commit is contained in:
parent
8bda698bb3
commit
10f7f716f0
|
@ -48,6 +48,9 @@ ve.dm.MWReferencesListNode.static.matchTagNames = null;
|
|||
|
||||
ve.dm.MWReferencesListNode.static.matchRdfaTypes = [ 'mw:Extension/references', 'mw:Transclusion' ];
|
||||
|
||||
// This node has the same specificity as ve.dm.MWTranslcusionNode and only matches
|
||||
// ahead of it because it is registered later (via a dependency in ResourceLoader)
|
||||
// TODO: Make this less fragile.
|
||||
ve.dm.MWReferencesListNode.static.matchFunction = function ( domElement ) {
|
||||
function isRefList( el ) {
|
||||
return el && el.nodeType === Node.ELEMENT_NODE && ( el.getAttribute( 'typeof' ) || '' ).indexOf( 'mw:Extension/references' ) !== -1;
|
||||
|
|
|
@ -87,7 +87,8 @@ class CiteHooks {
|
|||
've.ce.MWReferenceNode.css',
|
||||
],
|
||||
"dependencies" => [
|
||||
"ext.visualEditor.mwcore"
|
||||
"ext.visualEditor.mwcore",
|
||||
"ext.visualEditor.mwtransclusion"
|
||||
],
|
||||
"messages" => [
|
||||
"cite-ve-referenceslist-isempty",
|
||||
|
|
Loading…
Reference in a new issue