Template:SyntaxHighlight header: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
|  Created page with "<noinclude> <templatedata> { 	"params": { 		"text": { 			"aliases": [ 				"1" 			], 			"label": "Text", 			"description": "Text to place in the header.", 			"type": "unbalanced-wikitext", 			"required": true 		} 	}, 	"description": "Header that can be placed before a <syntaxhighlight> tag to e.g. show a filename or block title.", 	"format": "inline" } </templatedata>  == Example ==  <pre><nowiki> {{SyntaxHighlight header|foo.dts}} <syntaxhighlight lang="dts" line> /dts-v..." |  move template source above template data | ||
| Line 1: | Line 1: | ||
| <noinclude> | <includeonly><div class="mw-highlight mainline-syntaxhighlight-header" style="background: var(--background-color-neutral,#eaecf0); color: var(--color-base,#202122); margin-bottom: -1em; padding: 0.35em 1.05em; border: 1px solid var(--border-color-muted,#dadde3); border-bottom: none; font-family: monospace; font-weight: bold;">{{{text|{{{1|}}}}}}</div></includeonly><!-- | ||
| --><noinclude> | |||
| <templatedata> | <templatedata> | ||
| { | { | ||
| Line 53: | Line 55: | ||
| }; | }; | ||
| </syntaxhighlight> | </syntaxhighlight> | ||
| </noinclude | </noinclude> | ||
Latest revision as of 18:01, 20 February 2025
Header that can be placed before a <syntaxhighlight> tag to e.g. show a filename or block title.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Text | text1 | Text to place in the header. | Unbalanced wikitext | required | 
Example
{{SyntaxHighlight header|foo.dts}}
<syntaxhighlight lang="dts" line>
/dts-v1/;
/ {
	#address-cells = <1>;
	#size-cells = <1>;
	
	my_node: node1@1000 {
		compatible = "vendor,foo";
		reg = <0x1000 0x54>;
		vendor,bar-factor = <0x2a>;
	};
};
</syntaxhighlight>
foo.dts
/dts-v1/;
/ {
	#address-cells = <1>;
	#size-cells = <1>;
	
	my_node: node1@1000 {
		compatible = "vendor,foo";
		reg = <0x1000 0x54>;
		vendor,bar-factor = <0x2a>;
	};
};