Template:Clade example/doc

From blackwiki
< Template:Clade example
Revision as of 09:08, 4 August 2018 by imported>Jts1882 (add example of intended result)
Jump to navigation Jump to search
Template code Resulting output
{{clade
|label1=label 
|1={{clade 
   |1=leaf1 
   |2=leaf2 
   }}
}}
label

leaf1

leaf2

The goal of this template was to display example code and executed results in a table. This was to make writing the documentation easier and avoid the need for repeating the code twice, once enclosed in the pre tag and once without.

Unfortunately the attempt was unsuccessful. Parameters are transcluded when used unless in certain tags (pre, nowiki). One idea was to stip the tags from a transclusion protected parameter using the Lua module, but code wrapped in pre tags isn't passed to the module. Instead it passes a strip marker.

Usage