Template:CodeSnippet: Difference between revisions
Jump to navigation
Jump to search
Helper: render a decoded code payload with syntax highlighting; usage {{CodeSnippet|code={{#content:Qxx}}|lang=python}} (via create-page on MediaWiki MCP Server) |
Neutralize broken template: extension-tag content is not preprocessed on MW 1.46, so it cannot wrap parser-function output (via update-page on MediaWiki MCP Server) |
||
| Line 1: | Line 1: | ||
<syntaxhighlight | <includeonly>{{error|Template:CodeSnippet is not usable: MediaWiki 1.46 does not expand parser functions or template parameters inside <syntaxhighlight> / <pre> tags. Render decoded content directly with <nowiki>{{#content:Qxx}}</nowiki> instead.}}</includeonly><noinclude> | ||
{{ | Created as a helper for the multi-line demo on [[Sandbox:Temp]], then found broken: on MW 1.46 the content of extension tags is protected from preprocessing, so a <code>{{#content:Qxx}}</code> argument cannot be wrapped in <code><syntaxhighlight></code> via a template. Deletion is admin-only, so this stub replaces it. Use <nowiki>{{#content:Qxx}}</nowiki> bare for decoded payloads. | ||
</noinclude> | </noinclude> | ||
Latest revision as of 11:33, 30 August 2026
Created as a helper for the multi-line demo on Sandbox:Temp, then found broken: on MW 1.46 the content of extension tags is protected from preprocessing, so a argument cannot be wrapped in <syntaxhighlight> via a template. Deletion is admin-only, so this stub replaces it. Use {{#content:Qxx}} bare for decoded payloads.