Module:unsubst/documentation

This module protects templates and modules from being wrongly substituted.

Usage
First, put the following at the beginning of the  function in the module: Where lua should be replaced with the function name. Next, edit the template:

The is optional. The template will substitute into its transcluded form.

To protect the module itself instead of the template, add this at the start of the function instead:

Directly in templates
You can wrap the template code in

It will work just like  above, apart from also generating a transclusion to Module:unsubst. Additionally, it protects templates from being copied and pasted to non-template pages.