<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ANowraplinks%2Fdoc</id>
	<title>Template:Nowraplinks/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ANowraplinks%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Template:Nowraplinks/doc&amp;action=history"/>
	<updated>2026-04-12T13:25:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://moasspedia.org/w/index.php?title=Template:Nowraplinks/doc&amp;diff=25487&amp;oldid=prev</id>
		<title>Wikipedia&gt;WOSlinker: change source to syntaxhighlight</title>
		<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Template:Nowraplinks/doc&amp;diff=25487&amp;oldid=prev"/>
		<updated>2020-07-07T12:56:15Z</updated>

		<summary type="html">&lt;p&gt;change source to syntaxhighlight&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}} __NOTOC__&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the {{tl|nowraplinks}} template.&lt;br /&gt;
&lt;br /&gt;
This template works in conjunction with {{tl|nowraplinks end}} to prevent word wraps (line breaks) inside links that include a space or spaces while allowing wraps between links and in normal text. This can be useful, for instance, in long lists of links. It is similar to {{tl|nowrap begin}}...{{tl|nowrap end}}.&lt;br /&gt;
&lt;br /&gt;
Reading [[Wikipedia:Line-break handling]] is recommended before starting to use this template.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{{nowraplinks}}&lt;br /&gt;
&lt;br /&gt;
[[This link will not wrap]] - [[This link also won&amp;#039;t wrap]] -&lt;br /&gt;
[[And so on]] - But this sentence might word wrap.&lt;br /&gt;
&lt;br /&gt;
{{nowraplinks end}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{{nowraplinks | [[This link will not wrap]] - [[This link also won&amp;#039;t wrap]] -&lt;br /&gt;
[[And so on]] - But this sentence might word wrap. }}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both examples will render something like this:&lt;br /&gt;
&lt;br /&gt;
:[[Template:Nowraplinks end|This link will not wrap]] - &amp;lt;br&amp;gt;&lt;br /&gt;
:[[Template:Nowraplinks end|This link also won&amp;#039;t wrap]] - &amp;lt;br&amp;gt;&lt;br /&gt;
:[[Template:Nowraplinks end|And so on]] - But this sentence &amp;lt;br&amp;gt;&lt;br /&gt;
:might word wrap.&lt;br /&gt;
&lt;br /&gt;
But they will &amp;#039;&amp;#039;not&amp;#039;&amp;#039; render like this:&lt;br /&gt;
&lt;br /&gt;
:[[Template:Nowraplinks end|This link will not wrap]] - [[Template:Nowraplinks end|This link]]&amp;lt;br&amp;gt;&lt;br /&gt;
:[[Template:Nowraplinks end|shouldn&amp;#039;t have wrapped]] - [[Template:Nowraplinks end|And so on]] -&amp;lt;br&amp;gt;&lt;br /&gt;
:But this sentence might word wrap.&lt;br /&gt;
&lt;br /&gt;
===Advanced usage===&lt;br /&gt;
Most of the functionality in this template is implemented as a CSS class in [[MediaWiki:Common.css|common.css]]. That class can be used together with pretty much any HTML tag or any box to prevent links to word wrap. For instance like this:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div class=&amp;quot;nowraplinks&amp;quot;&amp;gt; Lots of text and links &amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Or like this:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;nowraplinks&amp;quot;&amp;gt; Lots of text and links &amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the nowraplinks class is applied in the header of a table it will prevent line wrapping of links in &amp;#039;&amp;#039;all&amp;#039;&amp;#039; cells in the table. Note that in a table header there usually is a need to apply several classes. Then the class names should be separated by spaces in the class tag, not by commas or semicolons. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable nowraplinks&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[This link will not wrap]]{{·}} &lt;br /&gt;
[[This link also won&amp;#039;t wrap]]{{·}} &lt;br /&gt;
[[And so on]]{{·}} &lt;br /&gt;
But this sentence might word wrap.&lt;br /&gt;
|&lt;br /&gt;
[[This link will not wrap]]{{·}} &lt;br /&gt;
[[This link also won&amp;#039;t wrap]]{{·}} &lt;br /&gt;
[[And so on]]{{·}} &lt;br /&gt;
But this sentence might word wrap.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will render this:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable nowraplinks&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
[[Template:Nowraplinks end|This link will not wrap]]{{·}} &lt;br /&gt;
[[Template:Nowraplinks end|This link also won&amp;#039;t wrap]]{{·}} &lt;br /&gt;
[[Template:Nowraplinks end|And so on]]{{·}} &lt;br /&gt;
But this sentence might word wrap.&lt;br /&gt;
|&lt;br /&gt;
[[Template:Nowraplinks end|This link will not wrap]]{{·}} &lt;br /&gt;
[[Template:Nowraplinks end|This link also won&amp;#039;t wrap]]{{·}} &lt;br /&gt;
[[Template:Nowraplinks end|And so on]]{{·}} &lt;br /&gt;
But this sentence might word wrap.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To really see the nowrap effect on the links above you can drag the width of your web browser window so it becomes smaller and smaller.&lt;br /&gt;
&lt;br /&gt;
===Technical details===&lt;br /&gt;
The actual code that does the job is this [[CSS]] code in [[MediaWiki:Common.css|Common.css]]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;css&amp;quot;&amp;gt;&lt;br /&gt;
.nowraplinks a,&lt;br /&gt;
.nowraplinks .selflink { &lt;br /&gt;
  white-space: nowrap;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It simply means that any white-space inside links (HTML A tags) and bold &amp;quot;links&amp;quot; to the page itself are not allowed to wrap.&lt;br /&gt;
&lt;br /&gt;
It is then invoked like this:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span class=&amp;quot;nowraplinks&amp;quot;&amp;gt; Lots of text and links &amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That span code is what the {{tl|nowraplinks}} and {{tl|nowraplinks end}} tags are packaging in an easy to use way.&lt;br /&gt;
&lt;br /&gt;
The [[Template:Navbox|standard navboxes]] use the .nowraplinks class, thus automatically handling most wrapping problems in those navboxes.&lt;br /&gt;
&lt;br /&gt;
===See also===&lt;br /&gt;
{{List of nowrap-like templates}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- ADD CATEGORIES BELOW THIS LINE --&amp;gt;&lt;br /&gt;
[[Category:Line-handling templates]]&lt;br /&gt;
&lt;br /&gt;
[[et:Mall:Nowraplinks]]&lt;br /&gt;
[[ja:Template:Nowraplinks]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;WOSlinker</name></author>
	</entry>
</feed>