https://bugzilla.wikimedia.org/show_bug.cgi?id=46811
--- Comment #7 from [email protected] --- The soln in Comment 6 could work but it has to be able to continue to deal with (currently supported) scenarios like: {| style='color:red;' {{echo|class='test'}}\n|foo\n|} {| {{echo|class='test'}} style='color:red;'\n|foo\n|} So, in general, it has to handle the following scenario. {| <0 or more attrs> {{tpl here}} <0 or more attrs> .. |} In addition, this has to also deal with: {| <0 or more attrs> {{tpl-that-generates-more-attrs-and-content}} .. |} So, this has the potential to get complex / fragile. I think the alternative -- Variant (1) in the description -- might potentially work out simpler and more robust since it can handle all of these scenarios identically. So, this is what the AttributeExpander sees in @ line 150 for newK. ["class=\"infobox \" style=\"float: right; clear: right; width: 315px; border-spacing: 2px; text-align: left; font-size: 90%;\"",{"type":"NlTk","dataAttribs":{}},{"type":"TagTk","name":"th","attribs": ... }] Hoisting everything from NlTk after the table token could work. But, you still need to clean up after this fixup since the template expansion would have been wrapped in meta-tags. So, you would have to hoist the tpl-start meta-tag to a position before the table-start ... So, instead of returning: cb( { tokens: [token] } ) .. you might fix this to return [meta-start, token-with-fixed-attrs, NlTk-and-all-other-tokens-found-in-attr] Lot of hand-waving going on ... but, in either scenario, the template wrapping will need fixing up in some fashion. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
