nixpkgs/pkgs/development/python-modules/pelican-fix-tests-with-pygments-2.1.patch

319 lines
351 KiB
Diff
Raw Normal View History

diff --git a/pelican/tests/output/basic/feeds/all-en.atom.xml b/pelican/tests/output/basic/feeds/all-en.atom.xml
index 3ce41d7..3cf97a8 100644
--- a/pelican/tests/output/basic/feeds/all-en.atom.xml
+++ b/pelican/tests/output/basic/feeds/all-en.atom.xml
@@ -42,7 +42,7 @@ pelican.conf, it will have nothing in default.</p>
</div>
<div class="section" id="testing-more-sourcecode-directives">
<h2>Testing more sourcecode directives</h2>
-<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><span class="lineno"> </span> <span class="testingc"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><span class="lineno special">14</span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><span class="lineno"> </span> <br></span><span id="foo-16"><a name="foo-16"></a><span class="lineno special">16</span> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings">'linenos'</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings">'linenos'</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings">'table'</span><span class="testingp">,</span> <span class="testings">'inline'</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><span class="lineno special">18</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</sp
+<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8 </span><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10 </span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12 </span> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><span class="lineno"> </span> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><span class="lineno special">14 </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><span class="lineno"> </span><br></span><span id="foo-16"><a name="foo-16"></a><span class="lineno special">16 </span> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">'linenos'</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">'linenos'</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">'table'</span><span class="testingp">,</span> <span class="testings1">'inline'</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><span class="lineno special">18 </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[&l
<p>Lovely.</p>
</div>
<div class="section" id="testing-even-more-sourcecode-directives">
@@ -58,4 +58,4 @@ pelican.conf, it will have nothing in default.</p>
<p>Lovely.</p>
</div>
</summary></entry><entry><title>The baz tag</title><link href="/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00+00:00</updated><author><name></name></author><id>tag:,2010-03-14:tag/baz.html</id><summary type="html">&lt;p&gt;This article overrides the listening of the articles under the &lt;em&gt;baz&lt;/em&gt; tag.&lt;/p&gt;
-</summary></entry></feed>
+</summary></entry></feed>
\ No newline at end of file
diff --git a/pelican/tests/output/basic/feeds/all.atom.xml b/pelican/tests/output/basic/feeds/all.atom.xml
index 3a9478a..24d31a9 100644
--- a/pelican/tests/output/basic/feeds/all.atom.xml
+++ b/pelican/tests/output/basic/feeds/all.atom.xml
@@ -43,7 +43,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
@@ -59,4 +59,4 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
</summary></entry><entry><title>The baz tag</title><link href="/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00+00:00</updated><author><name></name></author><id>tag:,2010-03-14:tag/baz.html</id><summary type="html">&lt;p&gt;This article overrides the listening of the articles under the &lt;em&gt;baz&lt;/em&gt; tag.&lt;/p&gt;
-</summary></entry></feed>
+</summary></entry></feed>
\ No newline at end of file
diff --git a/pelican/tests/output/basic/feeds/misc.atom.xml b/pelican/tests/output/basic/feeds/misc.atom.xml
index a9b5977..4ad7008 100644
--- a/pelican/tests/output/basic/feeds/misc.atom.xml
+++ b/pelican/tests/output/basic/feeds/misc.atom.xml
@@ -19,7 +19,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
@@ -35,4 +35,4 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
</summary></entry><entry><title>The baz tag</title><link href="/tag/baz.html" rel="alternate"></link><updated>2010-03-14T00:00:00+00:00</updated><author><name></name></author><id>tag:,2010-03-14:tag/baz.html</id><summary type="html">&lt;p&gt;This article overrides the listening of the articles under the &lt;em&gt;baz&lt;/em&gt; tag.&lt;/p&gt;
-</summary></entry></feed>
+</summary></entry></feed>
\ No newline at end of file
diff --git a/pelican/tests/output/basic/unbelievable.html b/pelican/tests/output/basic/unbelievable.html
index dfb0c54..b7f8a7e 100644
--- a/pelican/tests/output/basic/unbelievable.html
+++ b/pelican/tests/output/basic/unbelievable.html
@@ -38,7 +38,7 @@
Published: Fri 15 October 2010
</abbr>
-<p>In <a href="/category/misc.html">misc</a>. </p>
+<p>In <a href="/category/misc.html">misc</a>.</p>
</footer><!-- /.post-info --> <p>Or completely awesome. Depends the needs.</p>
<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
@@ -58,7 +58,7 @@ pelican.conf, it will have nothing in default.</p>
</div>
<div class="section" id="testing-more-sourcecode-directives">
<h2>Testing more sourcecode directives</h2>
-<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><span class="lineno"> </span> <span class="testingc"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><span class="lineno special">14</span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><span class="lineno"> </span> <br></span><span id="foo-16"><a name="foo-16"></a><span class="lineno special">16</span> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><span class="lineno special">18</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><span class="lineno"> </span> <br></span><span id="foo-20"><a name="foo-20"></a><span class="lineno special">20</span> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><span class="lineno"> </span> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><span class="lineno special">22</span>
+<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8 </span><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10 </span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12 </span> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><span class="lineno"> </span> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><span class="lineno special">14 </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><span class="lineno"> </span><br></span><span id="foo-16"><a name="foo-16"></a><span class="lineno special">16 </span> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><span class="lineno special">18 </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><span class="lineno"> </span><br></span><span id="foo-20"><a name="foo-20"></a><span class="lineno special">20 </span> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><span class="lineno"> </span> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><span class="lineno special">22 </span>
<p>Lovely.</p>
</div>
<div class="section" id="testing-even-more-sourcecode-directives">
@@ -97,4 +97,4 @@ pelican.conf, it will have nothing in default.</p>
</footer><!-- /#contentinfo -->
</body>
-</html>
+</html>
\ No newline at end of file
diff --git a/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml
index cb74637..987f987 100644
--- a/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml
+++ b/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml
@@ -42,7 +42,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml b/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml
index 2c4b116..89082ee 100644
--- a/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml
+++ b/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml
@@ -42,7 +42,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom/feeds/all-en.atom.xml b/pelican/tests/output/custom/feeds/all-en.atom.xml
index 3574ab4..75b6333 100644
--- a/pelican/tests/output/custom/feeds/all-en.atom.xml
+++ b/pelican/tests/output/custom/feeds/all-en.atom.xml
@@ -42,7 +42,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom/feeds/all.atom.xml b/pelican/tests/output/custom/feeds/all.atom.xml
index 391ab85..efb43cd 100644
--- a/pelican/tests/output/custom/feeds/all.atom.xml
+++ b/pelican/tests/output/custom/feeds/all.atom.xml
@@ -44,7 +44,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom/feeds/all.rss.xml b/pelican/tests/output/custom/feeds/all.rss.xml
index a78d2de..548b16c 100644
--- a/pelican/tests/output/custom/feeds/all.rss.xml
+++ b/pelican/tests/output/custom/feeds/all.rss.xml
@@ -44,7 +44,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom/feeds/misc.atom.xml b/pelican/tests/output/custom/feeds/misc.atom.xml
index 91d6b28..dbab63c 100644
--- a/pelican/tests/output/custom/feeds/misc.atom.xml
+++ b/pelican/tests/output/custom/feeds/misc.atom.xml
@@ -19,7 +19,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom/feeds/misc.rss.xml b/pelican/tests/output/custom/feeds/misc.rss.xml
index 3493d2a..2d13bda 100644
--- a/pelican/tests/output/custom/feeds/misc.rss.xml
+++ b/pelican/tests/output/custom/feeds/misc.rss.xml
@@ -19,7 +19,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom/unbelievable.html b/pelican/tests/output/custom/unbelievable.html
index 2e51cf0..b6d2136 100644
--- a/pelican/tests/output/custom/unbelievable.html
+++ b/pelican/tests/output/custom/unbelievable.html
@@ -43,9 +43,9 @@
</abbr>
<address class="vcard author">
- By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
+ By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
</address>
-<p>In <a href="./category/misc.html">misc</a>. </p>
+<p>In <a href="./category/misc.html">misc</a>.</p>
</footer><!-- /.post-info --> <p>Or completely awesome. Depends the needs.</p>
<p><a class="reference external" href="./a-markdown-powered-article.html">a root-relative link to markdown-article</a>
@@ -65,7 +65,7 @@ pelican.conf, it will have nothing in default.</p>
</div>
<div class="section" id="testing-more-sourcecode-directives">
<h2>Testing more sourcecode directives</h2>
-<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><span class="lineno"> </span> <span class="testingc"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><span class="lineno special">14</span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><span class="lineno"> </span> <br></span><span id="foo-16"><a name="foo-16"></a><span class="lineno special">16</span> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><span class="lineno special">18</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><span class="lineno"> </span> <br></span><span id="foo-20"><a name="foo-20"></a><span class="lineno special">20</span> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><span class="lineno"> </span> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><span class="lineno special">22</span>
+<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8 </span><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10 </span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12 </span> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><span class="lineno"> </span> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><span class="lineno special">14 </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><span class="lineno"> </span><br></span><span id="foo-16"><a name="foo-16"></a><span class="lineno special">16 </span> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><span class="lineno special">18 </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><span class="lineno"> </span><br></span><span id="foo-20"><a name="foo-20"></a><span class="lineno special">20 </span> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><span class="lineno"> </span> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><span class="lineno special">22 </span>
<p>Lovely.</p>
</div>
<div class="section" id="testing-even-more-sourcecode-directives">
diff --git a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml
index 8fb3ef6..2090087 100644
--- a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml
+++ b/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml
@@ -42,7 +42,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml b/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml
index 99255ee..00944ce 100644
--- a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml
+++ b/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml
@@ -42,7 +42,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom_locale/feeds/all-en.atom.xml b/pelican/tests/output/custom_locale/feeds/all-en.atom.xml
index 6b2f09b..297558d 100644
--- a/pelican/tests/output/custom_locale/feeds/all-en.atom.xml
+++ b/pelican/tests/output/custom_locale/feeds/all-en.atom.xml
@@ -42,7 +42,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom_locale/feeds/all.atom.xml b/pelican/tests/output/custom_locale/feeds/all.atom.xml
index 5ef59e0..78da527 100644
--- a/pelican/tests/output/custom_locale/feeds/all.atom.xml
+++ b/pelican/tests/output/custom_locale/feeds/all.atom.xml
@@ -44,7 +44,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom_locale/feeds/all.rss.xml b/pelican/tests/output/custom_locale/feeds/all.rss.xml
index 071e2f1..84fd5df 100644
--- a/pelican/tests/output/custom_locale/feeds/all.rss.xml
+++ b/pelican/tests/output/custom_locale/feeds/all.rss.xml
@@ -44,7 +44,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom_locale/feeds/misc.atom.xml b/pelican/tests/output/custom_locale/feeds/misc.atom.xml
index c91d4d7..fde02e6 100644
--- a/pelican/tests/output/custom_locale/feeds/misc.atom.xml
+++ b/pelican/tests/output/custom_locale/feeds/misc.atom.xml
@@ -19,7 +19,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom_locale/feeds/misc.rss.xml b/pelican/tests/output/custom_locale/feeds/misc.rss.xml
index 82b5898..bd727bb 100644
--- a/pelican/tests/output/custom_locale/feeds/misc.rss.xml
+++ b/pelican/tests/output/custom_locale/feeds/misc.rss.xml
@@ -19,7 +19,7 @@ pelican.conf, it will have nothing in default.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-more-sourcecode-directives"&gt;
&lt;h2&gt;Testing more sourcecode directives&lt;/h2&gt;
-&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8&lt;/span&gt; &lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10&lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12&lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14&lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16&lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/sp
+&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span id="foo-8"&gt;&lt;a name="foo-8"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt; 8 &lt;/span&gt;&lt;span class="testingk"&gt;def&lt;/span&gt; &lt;span class="testingnf"&gt;run&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingp"&gt;):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-9"&gt;&lt;a name="foo-9"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;assert_has_content&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-10"&gt;&lt;a name="foo-10"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;10 &lt;/span&gt; &lt;span class="testingk"&gt;try&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-11"&gt;&lt;a name="foo-11"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;get_lexer_by_name&lt;/span&gt;&lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;arguments&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testingmi"&gt;0&lt;/span&gt;&lt;span class="testingp"&gt;])&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-12"&gt;&lt;a name="foo-12"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;12 &lt;/span&gt; &lt;span class="testingk"&gt;except&lt;/span&gt; &lt;span class="testingne"&gt;ValueError&lt;/span&gt;&lt;span class="testingp"&gt;:&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-13"&gt;&lt;a name="foo-13"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingc1"&gt;# no lexer found - use the text one instead of an exception&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-14"&gt;&lt;a name="foo-14"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;14 &lt;/span&gt; &lt;span class="testingn"&gt;lexer&lt;/span&gt; &lt;span class="testingo"&gt;=&lt;/span&gt; &lt;span class="testingn"&gt;TextLexer&lt;/span&gt;&lt;span class="testingp"&gt;()&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-15"&gt;&lt;a name="foo-15"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-16"&gt;&lt;a name="foo-16"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;16 &lt;/span&gt; &lt;span class="testingk"&gt;if&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt; &lt;span class="testingow"&gt;and&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-17"&gt;&lt;a name="foo-17"&gt;&lt;/a&gt;&lt;span class="lineno"&gt; &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;linenos&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;]&lt;/span&gt; &lt;span class="testingow"&gt;not&lt;/span&gt; &lt;span class="testingow"&gt;in&lt;/span&gt; &lt;span class="testingp"&gt;(&lt;/span&gt;&lt;span class="testings1"&gt;&amp;#39;table&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;,&lt;/span&gt; &lt;span class="testings1"&gt;&amp;#39;inline&amp;#39;&lt;/span&gt;&lt;span class="testingp"&gt;)):&lt;/span&gt;&lt;br&gt;&lt;/span&gt;&lt;span id="foo-18"&gt;&lt;a name="foo-18"&gt;&lt;/a&gt;&lt;span class="lineno special"&gt;18 &lt;/span&gt; &lt;span class="testingbp"&gt;self&lt;/span&gt;&lt;span class="testingo"&gt;.&lt;/span&gt;&lt;span class="testingn"&gt;options&lt;/span&gt;&lt;span class="testingp"&gt;[&l
&lt;p&gt;Lovely.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="testing-even-more-sourcecode-directives"&gt;
diff --git a/pelican/tests/output/custom_locale/posts/2010/octobre/15/unbelievable/index.html b/pelican/tests/output/custom_locale/posts/2010/octobre/15/unbelievable/index.html
index a6ea869..1e2d78f 100644
--- a/pelican/tests/output/custom_locale/posts/2010/octobre/15/unbelievable/index.html
+++ b/pelican/tests/output/custom_locale/posts/2010/octobre/15/unbelievable/index.html
@@ -45,7 +45,7 @@
<address class="vcard author">
By <a class="url fn" href="../../../../../author/alexis-metaireau.html">Alexis Métaireau</a>
</address>
-<p>In <a href="../../../../../category/misc.html">misc</a>. </p>
+<p>In <a href="../../../../../category/misc.html">misc</a>.</p>
</footer><!-- /.post-info --> <p>Or completely awesome. Depends the needs.</p>
<p><a class="reference external" href="../../../../../posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a>
@@ -65,7 +65,7 @@ pelican.conf, it will have nothing in default.</p>
</div>
<div class="section" id="testing-more-sourcecode-directives">
<h2>Testing more sourcecode directives</h2>
-<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8</span> <span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10</span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12</span> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><span class="lineno"> </span> <span class="testingc"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><span class="lineno special">14</span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><span class="lineno"> </span> <br></span><span id="foo-16"><a name="foo-16"></a><span class="lineno special">16</span> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><span class="lineno special">18</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><span class="lineno"> </span> <br></span><span id="foo-20"><a name="foo-20"></a><span class="lineno special">20</span> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><span class="lineno"> </span> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><span class="lineno special">22</span>
+<div class="highlight"><pre><span id="foo-8"><a name="foo-8"></a><span class="lineno special"> 8 </span><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><span class="lineno special">10 </span> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><span class="lineno"> </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><span class="lineno special">12 </span> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><span class="lineno"> </span> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><span class="lineno special">14 </span> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><span class="lineno"> </span><br></span><span id="foo-16"><a name="foo-16"></a><span class="lineno special">16 </span> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><span class="lineno"> </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><span class="lineno special">18 </span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><span class="lineno"> </span><br></span><span id="foo-20"><a name="foo-20"></a><span class="lineno special">20 </span> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><span class="lineno"> </span> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><span class="lineno special">22 </span>
<p>Lovely.</p>
</div>
<div class="section" id="testing-even-more-sourcecode-directives">