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:
Arlo Breault 2016-12-08 08:36:07 -08:00
parent a16445812f
commit 439bc3af2d

View file

@ -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,