mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Introduce a parseTokenContentsToDOM helper
It calls out to a slimmed down parseWikitextToDOM, since only a subset of that functionality is needed in some extensions, like gallery. Change-Id: I72e29c4b285fc8cae0207966cc2eddd0fe3ebcf3
This commit is contained in:
parent
678effaf0e
commit
e644753c6b
|
@ -53,7 +53,7 @@ Ref.prototype.toDOM = function(state, content, args) {
|
|||
// The php preprocessor did our expansion.
|
||||
const allowNestedRef = state.parseContext.inTemplate && state.parseContext.extTag !== 'ref';
|
||||
|
||||
return ParsoidExtApi.parseWikitextToDOM(state, args, '', content, {
|
||||
return ParsoidExtApi.parseTokenContentsToDOM(state, args, '', content, {
|
||||
// NOTE: sup's content model requires it only contain phrasing
|
||||
// content, not flow content. However, since we are building an
|
||||
// in-memory DOM which is simply a tree data structure, we can
|
||||
|
@ -373,7 +373,7 @@ var createReferences = function(env, body, refsOpts, modifyDp, autoGenerated) {
|
|||
};
|
||||
|
||||
References.prototype.toDOM = function(state, content, args) {
|
||||
return ParsoidExtApi.parseWikitextToDOM(state, args, '', content, {
|
||||
return ParsoidExtApi.parseTokenContentsToDOM(state, args, '', content, {
|
||||
wrapperTag: 'div',
|
||||
extTag: 'references',
|
||||
inTemplate: state.parseContext.inTemplate,
|
||||
|
|
Loading…
Reference in a new issue