Module talk:UnitTests: Difference between revisions

Content deleted Content added
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB)
Line 45:
 
[[Module:Citation/CS1]] supports some 25 live templates and [[Module:Citation/CS1/sandbox]] supports an equal number of sandbox templates. We could have added [[WP:TemplateStyles]] markup ({{tag|templatestyles|params=src="<{{var|name}}>/styles.css"|s}}) 25× to the live templates and 25× to the sandboxen but that just seemed dumb so each of the modules concatenate template styles to the end of the cs1|2 template rendering using this (where <code>styles</code> is the name of the appropriate css page):
:<sourcesyntaxhighlight lang="lua">frame:extensionTag ('templatestyles', '', {src=styles})})</sourcesyntaxhighlight>
and that works great.