Difference between revisions of "Template:Indentedpre"

From CCARH Wiki
Jump to navigation Jump to search
(Created page with "<includeonly> <ul> ::<table style="background:white;"><tr><td><source lang="text">{{{1}}} </source></td></tr></table></ul> </includeonly><noinclude> This template is used to c...")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
 
<ul>
 
<ul>
::<table style="background:white;"><tr><td><source lang="text">{{{1}}}
+
::<table style="background:white;"><tr><td>{{#tag:source|{{{1}}}|lang="text"}}</td></tr></table></ul>
</source></td></tr></table></ul>
 
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
This template is used to create a pre-styled display, but indented and not extending the colored box all of the way to the right margin.  Example:
 
This template is used to create a pre-styled display, but indented and not extending the colored box all of the way to the right margin.  Example:
  
<nowiki>
+
<pre><nowiki>{{indentedpre|This is some text}}</nowiki></pre>
{{indentedpre|This is some text}}
 
</nowiki>
 
  
 
Which generates this result:
 
Which generates this result:
 
+
{{indentedpre|This is some text
{{indentedpre|This is some text}}
+
This is a second line of text
 +
This is a third line of text}}
  
 
Compare to a regular pre:
 
Compare to a regular pre:

Latest revision as of 21:54, 15 January 2013

This template is used to create a pre-styled display, but indented and not extending the colored box all of the way to the right margin. Example:

{{indentedpre|This is some text}}

Which generates this result:

    This is some text
    This is a second line of text
    This is a third line of text
    

Compare to a regular pre: <pre>This is some text</pre> Which generates this style:

This is some text