mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
T104662: Allow nested ref tags only in templates
* To support the #tag parser function. * An aside, #tag is nutty, {{#tag:nowiki|test<ref>haha</ref>}} Change-Id: I0ab93f6ae959b30a887e967952c904ef0400b189
This commit is contained in:
parent
a16445812f
commit
439bc3af2d
|
@ -49,13 +49,6 @@ function hasRef(node) {
|
|||
* Handle ref tokens
|
||||
*/
|
||||
Ref.prototype.tokenHandler = function(manager, pipelineOpts, refTok, cb) {
|
||||
// Nested <ref> tags at the top level are considered errors
|
||||
// But, inside templates, they are supported
|
||||
if (!pipelineOpts.inTemplate && pipelineOpts.extTag === "ref") {
|
||||
cb({ tokens: [refTok.getAttribute("source")] });
|
||||
return;
|
||||
}
|
||||
|
||||
var refOpts = Object.assign({
|
||||
name: null,
|
||||
group: null,
|
||||
|
|
Loading…
Reference in a new issue