Difference between revisions of "User:GarveyPatrickD/Combining the nowiki and pre tags"
(→alone: Changed bolding arrangement) |
(Revised headers) |
||
Line 39: | Line 39: | ||
==Placing each token on a separate line in the source== |
==Placing each token on a separate line in the source== |
||
===No leading or trailing white space=== |
===No leading or trailing white space=== |
||
− | ====<nowiki><nowiki></nowiki> alone==== |
+ | ====<nowiki><nowiki></nowiki></nowiki> alone==== |
<b> |
<b> |
||
<nowiki><nowiki></nowiki> |
<nowiki><nowiki></nowiki> |
||
Line 68: | Line 68: | ||
Please note the result is the same as placing all the tokens on one line in the source. |
Please note the result is the same as placing all the tokens on one line in the source. |
||
− | ====<nowiki><pre></nowiki> alone==== |
+ | ====<nowiki><pre></pre></nowiki> alone==== |
<b> |
<b> |
||
<nowiki> |
<nowiki> |
||
Line 97: | Line 97: | ||
===Leading and trailing white space=== |
===Leading and trailing white space=== |
||
− | ====<nowiki><nowiki></nowiki> alone==== |
+ | ====<nowiki><nowiki></nowiki></nowiki> alone==== |
<b> |
<b> |
||
<nowiki><nowiki></nowiki> |
<nowiki><nowiki></nowiki> |
||
Line 123: | Line 123: | ||
<br /> |
<br /> |
||
Please note the result is the same as placing all the tokens on one line in the source. |
Please note the result is the same as placing all the tokens on one line in the source. |
||
− | ====<nowiki><pre></nowiki> alone==== |
+ | ====<nowiki><pre></pre></nowiki> alone==== |
<b> |
<b> |
||
<nowiki><pre></nowiki> |
<nowiki><pre></nowiki> |
Revision as of 03:47, 25 November 2011
These are a series of tests of combining the <nowiki> and <pre> tags. This is motivated by the results seen after a migration utility was used on pages encoded in another wiki syntax for use in a replacement MediaWiki. The most important question is, is there a reason to use both of these tags together? If so, what is the effect of various nestings of the two tags?
Contents
Using only one tag
Placing all the tokens on one line in the source
No leading or trailing white space
<nowiki></nowiki> alone
Source:
<nowiki>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</nowiki>
Display:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<pre></pre> alone
Source:
<pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</pre>
Display:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Leading and trailing white space
<nowiki></nowiki> alone
Source:
<nowiki> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </nowiki>
Display:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Note: minimum white space is used in the result.
<pre></pre> alone
Source:
<pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre>
Display:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Note: white space is preserved in the result
Placing each token on a separate line in the source
No leading or trailing white space
<nowiki></nowiki> alone
<nowiki>
Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
</nowiki>
Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
Please note the result is the same as placing all the tokens on one line in the source.
<pre></pre> alone
<pre>
Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Please note each token between the tags is placed on a separate line.
Leading and trailing white space
<nowiki></nowiki> alone
<nowiki>
Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
</nowiki>
Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
Please note the result is the same as placing all the tokens on one line in the source.
<pre></pre> alone
<pre>
Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Please note each token between the tags is placed on a separate line with, at least, leading whitespace.
Using both tags
Placing all the tokens on one line in the source
No leading or trailing white space
<nowiki> first, then <pre>
<pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</pre>
<pre> first, then <nowiki>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Leading and trailing white space
<nowiki> first, then <pre>
<pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre>
<pre> first, then <nowiki>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Placing each token on a separate line in the source
No leading or trailing white space
<nowiki> first, then <pre>
<pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre>
<pre> first, then <nowiki>
Please note the additional vertical spacing in the result.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Leading and trailing white space
<nowiki> first, then <pre>
<pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre>
<pre> first, then <nowiki>
Please note the additional vertical spacing in the result.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.