mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Remove Cite-specific flag from parser pipeline options
* Use a generic extTagOpts that is opaque to the core parser but the individual extension can inspect. Change-Id: I4d1331604828d583b820084e00af68232ec767f8
This commit is contained in:
parent
d8f4a31efe
commit
1a2b7e796f
|
@ -41,7 +41,9 @@ function hasRef(node) {
|
|||
|
||||
Ref.prototype.toDOM = function(state, content, args) {
|
||||
// Drop nested refs entirely, unless we've explicitly allowed them
|
||||
if (state.parseContext.extTag === 'ref' && !state.parseContext.allowNestedRef) {
|
||||
if (state.parseContext.extTag === 'ref' &&
|
||||
!(state.parseContext.extTagOpts && state.parseContext.extTagOpts.allowNestedRef)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -57,9 +59,11 @@ Ref.prototype.toDOM = function(state, content, args) {
|
|||
// in-memory DOM which is simply a tree data structure, we can
|
||||
// nest flow content in a <sup> tag.
|
||||
wrapperTag: 'sup',
|
||||
extTag: 'ref',
|
||||
inTemplate: state.parseContext.inTemplate,
|
||||
allowNestedRef: allowNestedRef,
|
||||
extTag: 'ref',
|
||||
extTagOpts: {
|
||||
allowNestedRef: !!allowNestedRef,
|
||||
},
|
||||
noPWrapping: true,
|
||||
noPre: true,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue