Hi folks,

I'm trying to group 2 named references (which are identical as far as humans are concerned) together. I'm doing it on rowp, but the code is very close to enwp. One reference is generated from a template via a module calling Module:Citation/CS1, the other is generated by the same code, but the calling template is substituted.

The Lua code generating the reference tag is:
frame:extensionTag("ref", refText, { name = citationHash })
(refText is returned by Module:Citation/CS1)

I isolated the problem to the <templatestyles> tag added by Modul:Citation/CS1 - removing it from inside to outside the <ref></ref> part solves the issue. More precisely, the parser seems to generate different strip markers for each invocation, even if the <templatestyles> content is identical. This problem seems related to the one outlined in [1]. 

I have 2 questions related to this:

1. How should I change the Lua code to allow for templatestyles? According to the Lua reference manual [2], extensionTag is equivalent to a call to frame:callParserFunction() with function name '#tag', which suggests to me this should be the correct invocation wrt to [1].

2. Will a ref with a call to {{citation}} (which is simply a pass-through to the module) with the exact same parameters as in the module also work? The use-case is to generate a ref containing the template on substitution instead of the ton of metadata generated by the module.

Thanks,
   Strainu

[1] https://www.mediawiki.org/wiki/Help:Cite#Substitution_and_embedded_parser_functions
[2] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#frame:extensionTag