Topic on Talk:Requests for comment/Parser function and tag tracking

Distinguish between tags added via templates/modules and tags used directly

4
Dinoguy1000 (talkcontribs)

If it's not too difficult to implement, it would be useful for the tracking to distinguish between parser functions/tags added by a template or module, and those added directly to pages. Some wikis may prefer certain tags only be added in one way or another, and currently, even with Wikia's Special:TagsReport, there is no easy way to make this distinction. This would also provide a concrete use for this tracking, at least for those wikis with such a policy.

Legoktm (talkcontribs)

I'm not sure if this is really possible. Consider {{1x|<code>foobar</code>}}. The code tag is being output by the template, but in reality it's coming directly from the page.

I think your use case of ensuring tags aren't used in the source is best implemented by wikitext search (insource operator).

Dinoguy1000 (talkcontribs)

I thought that might be the case, but was hoping there might at least be a partial solution that would suffice for the majority of the time. Of course, it's not like I'm any more a fan of partial solutions than anyone else...

Tgr (WMF) (talkcontribs)

It would probably require adding depth tracking to PPFrame and logging when a parser function with depth = 0 is expanded. It does not seem that hard.

OTOH something like <tag/> in {{#if:<!--false-->|<tag/>}} would not be tracked since the parser never even processes it as it's on a dead branch.

Reply to "Distinguish between tags added via templates/modules and tags used directly"