Difference between revisions of "User:GarveyPatrickD/Combining the nowiki and pre tags"

From Xen
(Started the list with a test of the <abbr> HTML tag, which doesn't seem to work at the moment.)
 
m (Surrounding a Universal Record Locator (URL): data -> value)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
These are a series of tests of combining the <nowiki><nowiki></nowiki> and <nowiki><pre></nowiki> 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?
*<abbr title="abbreviation">abbr.</abbr>
 
  +
__TOC__
  +
=Surrounding arbitrary text=
  +
==Using only one tag==
  +
  +
===Placing all the tokens on one line in the source===
  +
  +
====No leading or trailing white space====
  +
=====<nowiki><nowiki></nowiki></nowiki> alone=====
  +
Source:<br />
  +
<b><nowiki><nowiki></nowiki></b>Lorem ipsum dolor sit amet, consectetur adipiscing elit.<b><nowiki></nowiki></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<nowiki>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</nowiki>
  +
  +
=====<nowiki><pre></pre></nowiki> alone=====
  +
Source:<br />
  +
<b><nowiki><pre></nowiki></b>Lorem ipsum dolor sit amet, consectetur adipiscing elit.<b><nowiki></pre></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</pre>
  +
  +
====Leading and trailing white space====
  +
=====<nowiki><nowiki></nowiki></nowiki> alone=====
  +
Source:<br />
  +
<b><nowiki><nowiki></nowiki></b> &nbsp;Lorem &nbsp;ipsum &nbsp;dolor &nbsp;sit &nbsp;amet, &nbsp;consectetur &nbsp;adipiscing &nbsp;elit. &nbsp;<b><nowiki></nowiki></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<nowiki> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </nowiki>
  +
<br />
  +
Note: minimum white space is used in the result.
  +
=====<nowiki><pre></pre></nowiki> alone=====
  +
Source:<br />
  +
<b><nowiki><pre></nowiki></b> &nbsp;Lorem &nbsp;ipsum &nbsp;dolor &nbsp;sit &nbsp;amet, &nbsp;consectetur &nbsp;adipiscing &nbsp;elit. &nbsp;<b><nowiki></pre></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre>
  +
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></nowiki></nowiki> alone=====
  +
Source:<br />
  +
<b>
  +
<nowiki><nowiki></nowiki>
  +
</b>
  +
<br />Lorem
  +
<br />ipsum
  +
<br />dolor
  +
<br />sit
  +
<br />amet,
  +
<br />consectetur
  +
<br />adipiscing
  +
<br />elit.
  +
<b>
  +
<br /></nowiki>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<nowiki>
  +
Lorem
  +
ipsum
  +
dolor
  +
sit
  +
amet,
  +
consectetur
  +
adipiscing
  +
elit.
  +
</nowiki>
  +
<br />
  +
Note: the result is the same as placing all the tokens on one line in the source.
  +
  +
=====<nowiki><pre></pre></nowiki> alone=====
  +
Source:<br />
  +
<b>
  +
<nowiki><pre></nowiki>
  +
</b>
  +
<br />Lorem
  +
<br />ipsum
  +
<br />dolor
  +
<br />sit
  +
<br />amet,
  +
<br />consectetur
  +
<br />adipiscing
  +
<br />elit.
  +
<b>
  +
<br /></pre>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<pre>
  +
Lorem
  +
ipsum
  +
dolor
  +
sit
  +
amet,
  +
consectetur
  +
adipiscing
  +
elit.
  +
</pre>
  +
Note: each token between the tags is placed on a separate line.
  +
  +
====Leading and trailing white space====
  +
=====<nowiki><nowiki></nowiki></nowiki> alone=====
  +
Source:<br />
  +
<b>
  +
<nowiki><nowiki></nowiki>
  +
</b>
  +
  +
<br />&nbsp;&nbsp;Lorem&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;ipsum&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;dolor&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;sit&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;amet,&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;consectetur&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;adipiscing&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;elit.&nbsp;&nbsp;
  +
  +
<b>
  +
<br /></nowiki>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<nowiki>
  +
  +
Lorem
  +
ipsum
  +
dolor
  +
sit
  +
amet,
  +
consectetur
  +
adipiscing
  +
elit.
  +
  +
</nowiki>
  +
<br />
  +
Note: the result is the same as placing all the tokens on one line in the source.
  +
  +
=====<nowiki><pre></pre></nowiki> alone=====
  +
Source:<br />
  +
<b>
  +
<nowiki><pre></nowiki>
  +
</b>
  +
  +
<br />&nbsp;&nbsp;Lorem&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;ipsum&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;dolor&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;sit&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;amet,&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;consectetur&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;adipiscing&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;elit.&nbsp;&nbsp;
  +
  +
<b>
  +
<br /></pre>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<pre>
  +
  +
Lorem
  +
ipsum
  +
dolor
  +
sit
  +
amet,
  +
consectetur
  +
adipiscing
  +
elit.
  +
  +
</pre>
  +
Note: each token between the tags is placed on a separate line with, at least, leading white space, including vertical white space.
  +
  +
==Using both tags==
  +
===Placing all the tokens on one line in the source===
  +
====No leading or trailing white space====
  +
=====<nowiki><nowiki></nowiki> first, then <nowiki><pre></nowiki>=====
  +
Source:<br />
  +
<b><nowiki><nowiki><pre></nowiki></b>Lorem ipsum dolor sit amet, consectetur adipiscing elit.<b><nowiki></pre></nowiki></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<nowiki><pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</pre></nowiki>
  +
<br />
  +
Note: the <b><nowiki><pre></nowiki></b> tag is displayed rather than consumed.
  +
=====<nowiki><pre></nowiki> first, then <nowiki><nowiki></nowiki>=====
  +
Source:<br />
  +
<b><nowiki><pre><nowiki></nowiki></b>Lorem ipsum dolor sit amet, consectetur adipiscing elit.<b><nowiki></nowiki></nowiki><nowiki></pre></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<pre><nowiki>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</nowiki></pre>
  +
Note: both tags are consumed.
  +
  +
====Leading and trailing white space====
  +
=====<nowiki><nowiki></nowiki> first, then <nowiki><pre></nowiki>=====
  +
Source:<br />
  +
<b><nowiki><nowiki><pre></nowiki></b> &nbsp;Lorem &nbsp;ipsum &nbsp;dolor &nbsp;sit &nbsp;amet, &nbsp;consectetur &nbsp;adipiscing &nbsp;elit. <b><nowiki></pre></nowiki></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<nowiki><pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre></nowiki>
  +
<br />
  +
Note: the <b><nowiki><pre></nowiki></b> tag is displayed rather than consumed and the white space after the tag is minimized.
  +
=====<nowiki><pre></nowiki> first, then <nowiki><nowiki></nowiki>=====
  +
Source:<br />
  +
<b><nowiki><pre><nowiki></nowiki></b> &nbsp;Lorem &nbsp;ipsum &nbsp;dolor &nbsp;sit &nbsp;amet, &nbsp;consectetur &nbsp;adipiscing &nbsp;elit. &nbsp;<b><nowiki></nowiki></nowiki><nowiki></pre></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<pre><nowiki> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </nowiki></pre>
  +
Note: both tags are consumed and the white space is preserved.
  +
  +
===Placing each token on a separate line in the source===
  +
====No leading or trailing white space====
  +
=====<nowiki><nowiki></nowiki> first, then <nowiki><pre></nowiki>=====
  +
Source:<br />
  +
<b>
  +
<nowiki><nowiki></nowiki>
  +
<br />
  +
<nowiki><pre></nowiki>
  +
</b>
  +
<br />Lorem
  +
<br />ipsum
  +
<br />dolor
  +
<br />sit
  +
<br />amet,
  +
<br />consectetur
  +
<br />adipiscing
  +
<br />elit.
  +
<b>
  +
<br />
  +
<nowiki></pre></nowiki>
  +
<br /></nowiki>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<nowiki>
  +
<pre>
  +
Lorem
  +
ipsum
  +
dolor
  +
sit
  +
amet,
  +
consectetur
  +
adipiscing
  +
elit.
  +
</pre>
  +
</nowiki>
  +
<br />
  +
Note: the <b><nowiki><pre></nowiki></b> tag is displayed rather than consumed and white space is used between the tag and the next/previous token.
  +
  +
=====<nowiki><pre></nowiki> first, then <nowiki><nowiki></nowiki>=====
  +
Source:<br />
  +
<b>
  +
<nowiki><pre></nowiki>
  +
<br />
  +
<nowiki><nowiki></nowiki>
  +
</b>
  +
<br />Lorem
  +
<br />ipsum
  +
<br />dolor
  +
<br />sit
  +
<br />amet,
  +
<br />consectetur
  +
<br />adipiscing
  +
<br />elit.
  +
<b>
  +
<br /></nowiki>
  +
<br /></pre>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<pre>
  +
<nowiki>
  +
Lorem
  +
ipsum
  +
dolor
  +
sit
  +
amet,
  +
consectetur
  +
adipiscing
  +
elit.
  +
</nowiki>
  +
</pre>
  +
Note: the additional vertical spacing in the result.
  +
  +
====Leading and trailing white space====
  +
=====<nowiki><nowiki></nowiki> first, then <nowiki><pre></nowiki>=====
  +
Source:<br />
  +
<b>
  +
<nowiki><nowiki></nowiki>
  +
<br />
  +
<nowiki><pre></nowiki>
  +
</b>
  +
  +
<br />&nbsp;&nbsp;Lorem&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;ipsum&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;dolor&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;sit&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;amet,&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;consectetur&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;adipiscing&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;elit.&nbsp;&nbsp;
  +
  +
<b>
  +
<br /><nowiki></pre></nowiki>
  +
<br /></nowiki>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<nowiki>
  +
<pre>
  +
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
  +
</pre>
  +
</nowiki>
  +
<br />
  +
Note: the <b><nowiki><pre></nowiki></b> tag is displayed rather than consumed and white space is used between the tag and the next/previous token.
  +
  +
=====<nowiki><pre></nowiki> first, then <nowiki><nowiki></nowiki>=====
  +
Source:<br />
  +
<b>
  +
<nowiki><pre></nowiki>
  +
<br />
  +
<nowiki><nowiki></nowiki>
  +
</b>
  +
  +
<br />&nbsp;&nbsp;Lorem&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;ipsum&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;dolor&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;sit&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;amet,&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;consectetur&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;adipiscing&nbsp;&nbsp;
  +
<br />&nbsp;&nbsp;elit.&nbsp;&nbsp;
  +
  +
<b>
  +
<br /></nowiki>
  +
<br /></pre>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<pre>
  +
<nowiki>
  +
Lorem
  +
ipsum
  +
dolor
  +
sit
  +
amet,
  +
consectetur
  +
adipiscing
  +
elit.
  +
</nowiki>
  +
</pre>
  +
Note: the additional vertical spacing and preserved horizontal spacing in the result.
  +
  +
=Surrounding a Universal Record Locator (URL)=
  +
The Universal Record Locator (URL) value is:
  +
<br />
  +
<nowiki>https://secure.wikimedia.org/</nowiki>
  +
==Using only one tag==
  +
  +
===Placing all the tokens on one line in the source===
  +
  +
====No leading or trailing white space====
  +
=====<nowiki><nowiki></nowiki></nowiki> alone=====
  +
Source:<br />
  +
<b><nowiki><nowiki></nowiki></b><nowiki>https://wikimediafoundation.org/wiki/Home</nowiki><b><nowiki></nowiki></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<nowiki>https://secure.wikimedia.org/</nowiki>
  +
  +
=====<nowiki><pre></pre></nowiki> alone=====
  +
Source:<br />
  +
<b><nowiki><pre></nowiki></b>https://secure.wikimedia.org/<b><nowiki></pre></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<pre>https://secure.wikimedia.org/</pre>
  +
  +
====Leading and trailing white space====
  +
=====<nowiki><nowiki></nowiki></nowiki> alone=====
  +
Source:<br />
  +
<b><nowiki><nowiki></nowiki></b> &nbsp;https://secure.wikimedia.org/ &nbsp;<b><nowiki></nowiki></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<nowiki> https://secure.wikimedia.org/ </nowiki>
  +
<br />
  +
Note: minimum white space is used in the result.
  +
=====<nowiki><pre></pre></nowiki> alone=====
  +
Source:<br />
  +
<b><nowiki><pre></nowiki></b> &nbsp;https://secure.wikimedia.org/ &nbsp;<b><nowiki></pre></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<pre> https://secure.wikimedia.org/ </pre>
  +
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></nowiki></nowiki> alone=====
  +
Source:<br />
  +
<b>
  +
<nowiki><nowiki></nowiki>
  +
</b>
  +
<br />
  +
https://secure.wikimedia.org/
  +
<br />
  +
</b>
  +
<br />
  +
Display:<br />
  +
<nowiki>
  +
https://secure.wikimedia.org/
  +
</nowiki>
  +
<br />
  +
Note: the result is the same as placing all the tokens on one line in the source.
  +
  +
=====<nowiki><pre></pre></nowiki> alone=====
  +
Source:<br />
  +
<b>
  +
<nowiki><pre></nowiki>
  +
</b>
  +
https://secure.wikimedia.org/
  +
<b>
  +
<br /></pre>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<pre>
  +
https://secure.wikimedia.org/
  +
</pre>
  +
Note: each token between the tags is placed on a separate line.
  +
  +
====Leading and trailing white space====
  +
=====<nowiki><nowiki></nowiki></nowiki> alone=====
  +
Source:<br />
  +
<b>
  +
<nowiki><nowiki></nowiki>
  +
</b>
  +
  +
<br />&nbsp;&nbsp;https://secure.wikimedia.org/&nbsp;&nbsp;
  +
  +
<b>
  +
<br /></nowiki>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<nowiki>
  +
  +
https://secure.wikimedia.org/
  +
  +
</nowiki>
  +
<br />
  +
Note: the result is the same as placing all the tokens on one line in the source.
  +
  +
=====<nowiki><pre></pre></nowiki> alone=====
  +
Source:<br />
  +
<b>
  +
<nowiki><pre></nowiki>
  +
</b>
  +
  +
<br />&nbsp;&nbsp;https://secure.wikimedia.org/&nbsp;&nbsp;
  +
  +
<b>
  +
<br /></pre>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<pre>
  +
  +
https://secure.wikimedia.org/
  +
  +
</pre>
  +
Note: each token between the tags is placed on a separate line with, at least, leading white space, including vertical white space.
  +
  +
==Using both tags==
  +
===Placing all the tokens on one line in the source===
  +
====No leading or trailing white space====
  +
=====<nowiki><nowiki></nowiki> first, then <nowiki><pre></nowiki>=====
  +
Source:<br />
  +
<b><nowiki><nowiki><pre></nowiki></b>https://secure.wikimedia.org/<b><nowiki></pre></nowiki></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<nowiki><pre>https://secure.wikimedia.org/</pre></nowiki>
  +
<br />
  +
Note: the <b><nowiki><pre></nowiki></b> tag is displayed rather than consumed.
  +
=====<nowiki><pre></nowiki> first, then <nowiki><nowiki></nowiki>=====
  +
Source:<br />
  +
<b><nowiki><pre><nowiki></nowiki></b>https://secure.wikimedia.org/<b><nowiki></nowiki></nowiki><nowiki></pre></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<pre><nowiki>https://secure.wikimedia.org/</nowiki></pre>
  +
Note: both tags are consumed.
  +
  +
====Leading and trailing white space====
  +
=====<nowiki><nowiki></nowiki> first, then <nowiki><pre></nowiki>=====
  +
Source:<br />
  +
<b><nowiki><nowiki><pre></nowiki></b> &nbsp;https://secure.wikimedia.org/ &nbsp;<b><nowiki></pre></nowiki></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<nowiki><pre> https://secure.wikimedia.org/ </pre></nowiki>
  +
<br />
  +
Note: the <b><nowiki><pre></nowiki></b> tag is displayed rather than consumed and the white space after the tag is minimized.
  +
=====<nowiki><pre></nowiki> first, then <nowiki><nowiki></nowiki>=====
  +
Source:<br />
  +
<b><nowiki><pre><nowiki></nowiki></b> &nbsp;https://secure.wikimedia.org/ &nbsp;<b><nowiki></nowiki></nowiki><nowiki></pre></nowiki></b>
  +
<br />
  +
Display:<br />
  +
<pre><nowiki> https://secure.wikimedia.org/ </nowiki></pre>
  +
Note: both tags are consumed and the white space is preserved.
  +
  +
===Placing each token on a separate line in the source===
  +
====No leading or trailing white space====
  +
=====<nowiki><nowiki></nowiki> first, then <nowiki><pre></nowiki>=====
  +
Source:<br />
  +
<b>
  +
<nowiki><nowiki></nowiki>
  +
<br />
  +
<nowiki><pre></nowiki>
  +
</b>
  +
<br />https://secure.wikimedia.org/
  +
<b>
  +
<br />
  +
<nowiki></pre></nowiki>
  +
<br /></nowiki>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<nowiki>
  +
<pre>
  +
https://secure.wikimedia.org/
  +
</pre>
  +
</nowiki>
  +
<br />
  +
Note: the <b><nowiki><pre></nowiki></b> tag is displayed rather than consumed and white space is used between the tag and the next/previous token.
  +
  +
=====<nowiki><pre></nowiki> first, then <nowiki><nowiki></nowiki>=====
  +
Source:<br />
  +
<b>
  +
<nowiki><pre></nowiki>
  +
<br />
  +
<nowiki><nowiki></nowiki>
  +
</b>
  +
<br />https://secure.wikimedia.org/
  +
<b>
  +
<br /></nowiki>
  +
<br /></pre>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<pre>
  +
<nowiki>
  +
https://secure.wikimedia.org/
  +
</nowiki>
  +
</pre>
  +
Note: the additional vertical spacing in the result.
  +
  +
====Leading and trailing white space====
  +
=====<nowiki><nowiki></nowiki> first, then <nowiki><pre></nowiki>=====
  +
Source:<br />
  +
<b>
  +
<nowiki><nowiki></nowiki>
  +
<br />
  +
<nowiki><pre></nowiki>
  +
</b>
  +
  +
<br />&nbsp;&nbsp;https://secure.wikimedia.org/&nbsp;&nbsp;
  +
  +
<b>
  +
<br /><nowiki></pre></nowiki>
  +
<br /></nowiki>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<nowiki>
  +
<pre>
  +
https://secure.wikimedia.org/
  +
</pre>
  +
</nowiki>
  +
<br />
  +
Note: the <b><nowiki><pre></nowiki></b> tag is displayed rather than consumed and white space is used between the tag and the next/previous token.
  +
  +
=====<nowiki><pre></nowiki> first, then <nowiki><nowiki></nowiki>=====
  +
Source:<br />
  +
<b>
  +
<nowiki><pre></nowiki>
  +
<br />
  +
<nowiki><nowiki></nowiki>
  +
</b>
  +
  +
<br />&nbsp;&nbsp;https://secure.wikimedia.org/&nbsp;&nbsp;
  +
  +
<b>
  +
<br /></nowiki>
  +
<br /></pre>
  +
</b>
  +
<br />
  +
Display:<br />
  +
<pre>
  +
<nowiki>
  +
https://secure.wikimedia.org/
  +
</nowiki>
  +
</pre>
  +
Note: the additional vertical spacing and preserved horizontal spacing in the result.
  +
  +
=Conclusion=
  +
Using the <nowiki><nowiki></nowiki></nowiki> tag pair inside a <nowiki><pre></pre></nowiki> tag pair has no additional effect.

Latest revision as of 23:11, 30 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

Surrounding arbitrary text

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

Source:
<nowiki>
Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
</nowiki>

Display:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Note: the result is the same as placing all the tokens on one line in the source.

<pre></pre> alone

Source:
<pre>
Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.



Display:

Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.

Note: each token between the tags is placed on a separate line.

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: the result is the same as placing all the tokens on one line in the source.

<pre></pre> alone

Source:
<pre>


  Lorem  
  ipsum  
  dolor  
  sit  
  amet,  
  consectetur  
  adipiscing  
  elit.  



Display:


  Lorem  
  ipsum  
  dolor  
  sit  
  amet,  
  consectetur  
  adipiscing  
  elit.  

Note: each token between the tags is placed on a separate line with, at least, leading white space, including vertical white space.

Using both tags

Placing all the tokens on one line in the source

No leading or trailing white space

<nowiki> first, then <pre>

Source:
<nowiki><pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</pre></nowiki>
Display:
<pre>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</pre>
Note: the <pre> tag is displayed rather than consumed.

<pre> first, then <nowiki>

Source:
<pre><nowiki>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</nowiki></pre>
Display:

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Note: both tags are consumed.

Leading and trailing white space

<nowiki> first, then <pre>

Source:
<nowiki><pre>  Lorem  ipsum  dolor  sit  amet,  consectetur  adipiscing  elit. </pre></nowiki>
Display:
<pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre>
Note: the <pre> tag is displayed rather than consumed and the white space after the tag is minimized.

<pre> first, then <nowiki>

Source:
<pre><nowiki>  Lorem  ipsum  dolor  sit  amet,  consectetur  adipiscing  elit.  </nowiki></pre>
Display:

  Lorem  ipsum  dolor  sit  amet,  consectetur  adipiscing  elit.  

Note: both tags are consumed and the white space is preserved.

Placing each token on a separate line in the source

No leading or trailing white space

<nowiki> first, then <pre>

Source:
<nowiki>
<pre>

Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
</pre>
</nowiki>

Display:
<pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre>
Note: the <pre> tag is displayed rather than consumed and white space is used between the tag and the next/previous token.

<pre> first, then <nowiki>

Source:
<pre>
<nowiki>

Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
</nowiki>



Display:


Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.

Note: the additional vertical spacing in the result.

Leading and trailing white space

<nowiki> first, then <pre>

Source:
<nowiki>
<pre>


  Lorem  
  ipsum  
  dolor  
  sit  
  amet,  
  consectetur  
  adipiscing  
  elit.  


</pre>
</nowiki>

Display:
<pre> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </pre>
Note: the <pre> tag is displayed rather than consumed and white space is used between the tag and the next/previous token.

<pre> first, then <nowiki>

Source:
<pre>
<nowiki>


  Lorem  
  ipsum  
  dolor  
  sit  
  amet,  
  consectetur  
  adipiscing  
  elit.  


</nowiki>



Display:


  Lorem  
  ipsum  
  dolor  
  sit  
  amet,  
  consectetur  
  adipiscing  
  elit.  

Note: the additional vertical spacing and preserved horizontal spacing in the result.

Surrounding a Universal Record Locator (URL)

The Universal Record Locator (URL) value is:
https://secure.wikimedia.org/

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>https://wikimediafoundation.org/wiki/Home</nowiki>
Display:
https://secure.wikimedia.org/

<pre></pre> alone

Source:
<pre>https://secure.wikimedia.org/</pre>
Display:

https://secure.wikimedia.org/

Leading and trailing white space

<nowiki></nowiki> alone

Source:
<nowiki>  https://secure.wikimedia.org/  </nowiki>
Display:
https://secure.wikimedia.org/
Note: minimum white space is used in the result.

<pre></pre> alone

Source:
<pre>  https://secure.wikimedia.org/  </pre>
Display:

  https://secure.wikimedia.org/  

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

Source:
<nowiki>
https://secure.wikimedia.org/

Display:
https://secure.wikimedia.org/
Note: the result is the same as placing all the tokens on one line in the source.

<pre></pre> alone

Source:
<pre> https://secure.wikimedia.org/



Display:

https://secure.wikimedia.org/

Note: each token between the tags is placed on a separate line.

Leading and trailing white space

<nowiki></nowiki> alone

Source:
<nowiki>


  https://secure.wikimedia.org/  


</nowiki>

Display:
https://secure.wikimedia.org/
Note: the result is the same as placing all the tokens on one line in the source.

<pre></pre> alone

Source:
<pre>


  https://secure.wikimedia.org/  



Display:


  https://secure.wikimedia.org/  

Note: each token between the tags is placed on a separate line with, at least, leading white space, including vertical white space.

Using both tags

Placing all the tokens on one line in the source

No leading or trailing white space

<nowiki> first, then <pre>

Source:
<nowiki><pre>https://secure.wikimedia.org/</pre></nowiki>
Display:
<pre>https://secure.wikimedia.org/</pre>
Note: the <pre> tag is displayed rather than consumed.

<pre> first, then <nowiki>

Source:
<pre><nowiki>https://secure.wikimedia.org/</nowiki></pre>
Display:

https://secure.wikimedia.org/

Note: both tags are consumed.

Leading and trailing white space

<nowiki> first, then <pre>

Source:
<nowiki><pre>  https://secure.wikimedia.org/  </pre></nowiki>
Display:
<pre> https://secure.wikimedia.org/ </pre>
Note: the <pre> tag is displayed rather than consumed and the white space after the tag is minimized.

<pre> first, then <nowiki>

Source:
<pre><nowiki>  https://secure.wikimedia.org/  </nowiki></pre>
Display:

  https://secure.wikimedia.org/  

Note: both tags are consumed and the white space is preserved.

Placing each token on a separate line in the source

No leading or trailing white space

<nowiki> first, then <pre>

Source:
<nowiki>
<pre>

https://secure.wikimedia.org/
</pre>
</nowiki>

Display:
<pre> https://secure.wikimedia.org/ </pre>
Note: the <pre> tag is displayed rather than consumed and white space is used between the tag and the next/previous token.

<pre> first, then <nowiki>

Source:
<pre>
<nowiki>

https://secure.wikimedia.org/
</nowiki>



Display:


https://secure.wikimedia.org/

Note: the additional vertical spacing in the result.

Leading and trailing white space

<nowiki> first, then <pre>

Source:
<nowiki>
<pre>


  https://secure.wikimedia.org/  


</pre>
</nowiki>

Display:
<pre> https://secure.wikimedia.org/ </pre>
Note: the <pre> tag is displayed rather than consumed and white space is used between the tag and the next/previous token.

<pre> first, then <nowiki>

Source:
<pre>
<nowiki>


  https://secure.wikimedia.org/  


</nowiki>



Display:


  https://secure.wikimedia.org/  

Note: the additional vertical spacing and preserved horizontal spacing in the result.

Conclusion

Using the <nowiki></nowiki> tag pair inside a <pre></pre> tag pair has no additional effect.