diff --git a/THANKS b/THANKS index 28b438847..c6caf0a6f 100644 --- a/THANKS +++ b/THANKS @@ -127,6 +127,7 @@ Nico Di Rocco Nicolas Duhamel Nicolas Perriault Nicolas Steinmetz +nkr Paolo Melchiorre Paul Asselin Pavel Puchkin diff --git a/pelican/readers.py b/pelican/readers.py index 59aa7ca33..ab474f2da 100644 --- a/pelican/readers.py +++ b/pelican/readers.py @@ -11,7 +11,7 @@ import docutils.core import docutils.io from docutils.parsers.rst.languages import get_language as get_docutils_lang -from docutils.writers.html4css1 import HTMLTranslator, Writer +from docutils.writers.html5_polyglot import HTMLTranslator, Writer from pelican import rstdirectives # NOQA from pelican.cache import FileStampDataCacher @@ -178,8 +178,8 @@ class RstReader(BaseReader): """Reader for reStructuredText files By default the output HTML is written using - docutils.writers.html4css1.Writer and translated using a subclass of - docutils.writers.html4css1.HTMLTranslator. If you want to override it with + docutils.writers.html5_polyglot.Writer and translated using a subclass of + docutils.writers.html5_polyglot.HTMLTranslator. If you want to override it with your own writer/translator (e.g. a HTML5-based one), pass your classes to these two attributes. Look in the source code for details. diff --git a/pelican/tests/output/basic/author/alexis-metaireau.html b/pelican/tests/output/basic/author/alexis-metaireau.html index e4bde41d0..73f1e6335 100644 --- a/pelican/tests/output/basic/author/alexis-metaireau.html +++ b/pelican/tests/output/basic/author/alexis-metaireau.html @@ -41,17 +41,15 @@

This is a super

In yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+
@@ -78,12 +76,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

read more diff --git a/pelican/tests/output/basic/category/bar.html b/pelican/tests/output/basic/category/bar.html index e89375bf2..0407c4260 100644 --- a/pelican/tests/output/basic/category/bar.html +++ b/pelican/tests/output/basic/category/bar.html @@ -38,12 +38,12 @@

Oh yeah !

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+
diff --git a/pelican/tests/output/basic/category/misc.html b/pelican/tests/output/basic/category/misc.html index fa9eb563a..e52336106 100644 --- a/pelican/tests/output/basic/category/misc.html +++ b/pelican/tests/output/basic/category/misc.html @@ -80,15 +80,15 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+

+

Testing another case

This will now have a line number in 'custom' since it's the default in - pelican.conf, it will …

+ pelican.conf, it will …

read more diff --git a/pelican/tests/output/basic/category/yeah.html b/pelican/tests/output/basic/category/yeah.html index ab08cc58a..1f33f7142 100644 --- a/pelican/tests/output/basic/category/yeah.html +++ b/pelican/tests/output/basic/category/yeah.html @@ -41,17 +41,15 @@

This is a super

In yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+
diff --git a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml index a0306a0b1..f8778f75e 100644 --- a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml +++ b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml @@ -1,22 +1,20 @@ -A Pelican Blog - Alexis Métaireau/2013-11-17T23:29:00+00:00This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +A Pelican Blog - Alexis Métaireau/2013-11-17T23:29:00+00:00This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> diff --git a/pelican/tests/output/basic/feeds/alexis-metaireau.rss.xml b/pelican/tests/output/basic/feeds/alexis-metaireau.rss.xml index d4989286c..2fd7dd9ea 100644 --- a/pelican/tests/output/basic/feeds/alexis-metaireau.rss.xml +++ b/pelican/tests/output/basic/feeds/alexis-metaireau.rss.xml @@ -1,10 +1,10 @@ -A Pelican Blog - Alexis Métaireau/Sun, 17 Nov 2013 23:29:00 +0000This is a super article !/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +A Pelican Blog - Alexis Métaireau/Sun, 17 Nov 2013 23:29:00 +0000This is a super article !/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0000tag:None,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !/oh-yeah.html<div class="section" id="why-not"> +Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0000tag:None,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0000tag:None,2010-10-20:/oh-yeah.htmlbarohbaryeah diff --git a/pelican/tests/output/basic/feeds/all-en.atom.xml b/pelican/tests/output/basic/feeds/all-en.atom.xml index 49c76c624..b279afa1d 100644 --- a/pelican/tests/output/basic/feeds/all-en.atom.xml +++ b/pelican/tests/output/basic/feeds/all-en.atom.xml @@ -6,69 +6,67 @@ <a href="/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-1.html<p>Article 1</p> Article 22011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-2.html<p>Article 2</p> Article 32011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Unbelievable !2010-10-15T20:30:00+00:002010-10-15T20:30:00+00:00tag:None,2010-10-15:/unbelievable.html<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> <a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><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> <a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+00:002010-03-14T00:00:00+00:00tag:None,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/basic/feeds/all.atom.xml b/pelican/tests/output/basic/feeds/all.atom.xml index b2399afe2..09691fe20 100644 --- a/pelican/tests/output/basic/feeds/all.atom.xml +++ b/pelican/tests/output/basic/feeds/all.atom.xml @@ -7,70 +7,68 @@ <a href="/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-1.html<p>Article 1</p> Article 22011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-2.html<p>Article 2</p> Article 32011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Trop bien !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00tag:None,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> Unbelievable !2010-10-15T20:30:00+00:002010-10-15T20:30:00+00:00tag:None,2010-10-15:/unbelievable.html<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> <a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><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> <a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+00:002010-03-14T00:00:00+00:00tag:None,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/basic/feeds/bar.atom.xml b/pelican/tests/output/basic/feeds/bar.atom.xml index 93fff29cb..49a4e2de9 100644 --- a/pelican/tests/output/basic/feeds/bar.atom.xml +++ b/pelican/tests/output/basic/feeds/bar.atom.xml @@ -1,8 +1,8 @@ -A Pelican Blog - bar/2010-10-20T10:14:00+00:00Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> +A Pelican Blog - bar/2010-10-20T10:14:00+00:00Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> diff --git a/pelican/tests/output/basic/feeds/misc.atom.xml b/pelican/tests/output/basic/feeds/misc.atom.xml index 9127b2a57..ff9d40c76 100644 --- a/pelican/tests/output/basic/feeds/misc.atom.xml +++ b/pelican/tests/output/basic/feeds/misc.atom.xml @@ -4,46 +4,46 @@ Unbelievable !2010-10-15T20:30:00+00:002010-10-15T20:30:00+00:00tag:None,2010-10-15:/unbelievable.html<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> <a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><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> <a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+00:002010-03-14T00:00:00+00:00tag:None,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/basic/feeds/yeah.atom.xml b/pelican/tests/output/basic/feeds/yeah.atom.xml index 6411bf6db..f706c2776 100644 --- a/pelican/tests/output/basic/feeds/yeah.atom.xml +++ b/pelican/tests/output/basic/feeds/yeah.atom.xml @@ -1,16 +1,14 @@ -A Pelican Blog - yeah/2013-11-17T23:29:00+00:00This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +A Pelican Blog - yeah/2013-11-17T23:29:00+00:00This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> +</section> diff --git a/pelican/tests/output/basic/index.html b/pelican/tests/output/basic/index.html index 0436d17b0..62c06b85a 100644 --- a/pelican/tests/output/basic/index.html +++ b/pelican/tests/output/basic/index.html @@ -165,7 +165,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more @@ -191,12 +191,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

read more @@ -219,15 +219,15 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+ +

Testing another case

This will now have a line number in 'custom' since it's the default in - pelican.conf, it will …

+ pelican.conf, it will …

read more diff --git a/pelican/tests/output/basic/oh-yeah.html b/pelican/tests/output/basic/oh-yeah.html index bcea5a935..febb6a8f6 100644 --- a/pelican/tests/output/basic/oh-yeah.html +++ b/pelican/tests/output/basic/oh-yeah.html @@ -46,12 +46,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+ diff --git a/pelican/tests/output/basic/tag/bar.html b/pelican/tests/output/basic/tag/bar.html index 0a1c7575d..55675af52 100644 --- a/pelican/tests/output/basic/tag/bar.html +++ b/pelican/tests/output/basic/tag/bar.html @@ -64,7 +64,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more @@ -90,12 +90,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+ read more diff --git a/pelican/tests/output/basic/tag/foo.html b/pelican/tests/output/basic/tag/foo.html index f310efee2..242340d55 100644 --- a/pelican/tests/output/basic/tag/foo.html +++ b/pelican/tests/output/basic/tag/foo.html @@ -64,7 +64,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more diff --git a/pelican/tests/output/basic/tag/foobar.html b/pelican/tests/output/basic/tag/foobar.html index edc1ed9aa..019ca20ec 100644 --- a/pelican/tests/output/basic/tag/foobar.html +++ b/pelican/tests/output/basic/tag/foobar.html @@ -41,17 +41,15 @@

This is a super

In yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+
diff --git a/pelican/tests/output/basic/tag/yeah.html b/pelican/tests/output/basic/tag/yeah.html index 2e1c41885..8c87287ba 100644 --- a/pelican/tests/output/basic/tag/yeah.html +++ b/pelican/tests/output/basic/tag/yeah.html @@ -38,12 +38,12 @@

Oh yeah !

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+
diff --git a/pelican/tests/output/basic/this-is-a-super-article.html b/pelican/tests/output/basic/this-is-a-super-article.html index ee5ae26bf..647753144 100644 --- a/pelican/tests/output/basic/this-is-a-super-article.html +++ b/pelican/tests/output/basic/this-is-a-super-article.html @@ -47,17 +47,15 @@

In yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+

diff --git a/pelican/tests/output/basic/unbelievable.html b/pelican/tests/output/basic/unbelievable.html index 2cd85dcb2..aea4d53d1 100644 --- a/pelican/tests/output/basic/unbelievable.html +++ b/pelican/tests/output/basic/unbelievable.html @@ -42,36 +42,36 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+ +

Testing another case

This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.

formatter = self.options and VARIANTS[self.options.keys()[0]]
 

Lovely.

-
-
+ +

Testing more sourcecode directives

 8def run(self):
self.assert_has_content()
10 try:
lexer = get_lexer_by_name(self.arguments[0])
12 except ValueError:
# no lexer found - use the text one instead of an exception
14 lexer = TextLexer()

16 if ('linenos' in self.options and
self.options['linenos'] not in ('table', 'inline')):
18 self.options['linenos'] = 'table'

20 for flag in ('nowrap', 'nobackground', 'anchorlinenos'):
if flag in self.options:
22 self.options[flag] = True

24 # noclasses should already default to False, but just in case...
formatter = HtmlFormatter(noclasses=False, **self.options)
26 parsed = highlight('\n'.join(self.content), lexer, formatter)
return [nodes.raw('', parsed, format='html')]

Lovely.

-
-
+ +

Testing even more sourcecode directives

formatter = self.options and VARIANTS[self.options.keys()[0]]

Lovely.

-
-
+ +

Testing overriding config defaults

Even if the default is line numbers, we can override it here

formatter = self.options and VARIANTS[self.options.keys()[0]]
 

Lovely.

-
+ diff --git a/pelican/tests/output/custom/author/alexis-metaireau2.html b/pelican/tests/output/custom/author/alexis-metaireau2.html index 438231627..b623c9d97 100644 --- a/pelican/tests/output/custom/author/alexis-metaireau2.html +++ b/pelican/tests/output/custom/author/alexis-metaireau2.html @@ -96,7 +96,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more @@ -122,12 +122,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+ read more

There are comments.

diff --git a/pelican/tests/output/custom/author/alexis-metaireau3.html b/pelican/tests/output/custom/author/alexis-metaireau3.html index cf7a6031c..9b7457067 100644 --- a/pelican/tests/output/custom/author/alexis-metaireau3.html +++ b/pelican/tests/output/custom/author/alexis-metaireau3.html @@ -49,15 +49,15 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+ +

Testing another case

This will now have a line number in 'custom' since it's the default in - pelican.conf, it will …

+ pelican.conf, it will …

read more

There are comments.

diff --git a/pelican/tests/output/custom/category/bar.html b/pelican/tests/output/custom/category/bar.html index 7415f9f48..dcf3b731b 100644 --- a/pelican/tests/output/custom/category/bar.html +++ b/pelican/tests/output/custom/category/bar.html @@ -42,12 +42,12 @@

Oh yeah !

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

There are comments.

diff --git a/pelican/tests/output/custom/category/misc.html b/pelican/tests/output/custom/category/misc.html index 895f253ed..a8997fbe0 100644 --- a/pelican/tests/output/custom/category/misc.html +++ b/pelican/tests/output/custom/category/misc.html @@ -93,15 +93,15 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+

+

Testing another case

This will now have a line number in 'custom' since it's the default in - pelican.conf, it will …

+ pelican.conf, it will …

read more

There are comments.

diff --git a/pelican/tests/output/custom/category/yeah.html b/pelican/tests/output/custom/category/yeah.html index a6d76ac2f..332a60496 100644 --- a/pelican/tests/output/custom/category/yeah.html +++ b/pelican/tests/output/custom/category/yeah.html @@ -45,17 +45,15 @@

This is a supe

In yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+

There are comments.

diff --git a/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml index 5bfb73d0c..9034dc95b 100644 --- a/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml +++ b/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml @@ -6,69 +6,67 @@ <a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-1.html<p>Article 1</p> Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-2.html<p>Article 2</p> Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml b/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml index b56546827..c6b3981be 100644 --- a/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml +++ b/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml @@ -6,24 +6,24 @@ <a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.htmlcat1Article 1http://blog.notmyidea.org/article-1.html<p>Article 1</p> Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-1.htmlcat1Article 2http://blog.notmyidea.org/article-2.html<p>Article 2</p> Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-2.htmlcat1Article 3http://blog.notmyidea.org/article-3.html<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-3.htmlcat1This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-3.htmlcat1This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not"> +Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !http://blog.notmyidea.org/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah.htmlbarohbaryeahUnbelievable !http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> +pelican.conf, it will …</p></section>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc diff --git a/pelican/tests/output/custom/feeds/all-en.atom.xml b/pelican/tests/output/custom/feeds/all-en.atom.xml index 1aac415a3..06be77e4c 100644 --- a/pelican/tests/output/custom/feeds/all-en.atom.xml +++ b/pelican/tests/output/custom/feeds/all-en.atom.xml @@ -6,69 +6,67 @@ <a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-1.html<p>Article 1</p> Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-2.html<p>Article 2</p> Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/custom/feeds/all.atom.xml b/pelican/tests/output/custom/feeds/all.atom.xml index dbe37a322..8bddb7b62 100644 --- a/pelican/tests/output/custom/feeds/all.atom.xml +++ b/pelican/tests/output/custom/feeds/all.atom.xml @@ -7,70 +7,68 @@ <a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-1.html<p>Article 1</p> Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-2.html<p>Article 2</p> Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Trop bien !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/custom/feeds/all.rss.xml b/pelican/tests/output/custom/feeds/all.rss.xml index 45a8dc589..445a31468 100644 --- a/pelican/tests/output/custom/feeds/all.rss.xml +++ b/pelican/tests/output/custom/feeds/all.rss.xml @@ -7,25 +7,25 @@ <a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.htmlcat1Article 1http://blog.notmyidea.org/article-1.html<p>Article 1</p> Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-1.htmlcat1Article 2http://blog.notmyidea.org/article-2.html<p>Article 2</p> Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-2.htmlcat1Article 3http://blog.notmyidea.org/article-3.html<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-3.htmlcat1This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-3.htmlcat1This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not"> +Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !http://blog.notmyidea.org/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah.htmlbarohbaryeahTrop bien !http://blog.notmyidea.org/oh-yeah-fr.html<p>Et voila du contenu en français</p> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.htmlmiscUnbelievable !http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> +pelican.conf, it will …</p></section>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc diff --git a/pelican/tests/output/custom/feeds/bar.atom.xml b/pelican/tests/output/custom/feeds/bar.atom.xml index d79aad2d8..33e0c6307 100644 --- a/pelican/tests/output/custom/feeds/bar.atom.xml +++ b/pelican/tests/output/custom/feeds/bar.atom.xml @@ -1,8 +1,8 @@ -Alexis' log - barhttp://blog.notmyidea.org/2010-10-20T10:14:00+02:00A personal blog.Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> +Alexis' log - barhttp://blog.notmyidea.org/2010-10-20T10:14:00+02:00A personal blog.Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> diff --git a/pelican/tests/output/custom/feeds/bar.rss.xml b/pelican/tests/output/custom/feeds/bar.rss.xml index c993753ac..2ef6bc209 100644 --- a/pelican/tests/output/custom/feeds/bar.rss.xml +++ b/pelican/tests/output/custom/feeds/bar.rss.xml @@ -1,8 +1,8 @@ -Alexis' log - barhttp://blog.notmyidea.org/A personal blog.Wed, 20 Oct 2010 10:14:00 +0200Oh yeah !http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not"> +Alexis' log - barhttp://blog.notmyidea.org/A personal blog.Wed, 20 Oct 2010 10:14:00 +0200Oh yeah !http://blog.notmyidea.org/oh-yeah.html<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah.htmlbarohbaryeah diff --git a/pelican/tests/output/custom/feeds/misc.atom.xml b/pelican/tests/output/custom/feeds/misc.atom.xml index 117c2bc24..315c83bab 100644 --- a/pelican/tests/output/custom/feeds/misc.atom.xml +++ b/pelican/tests/output/custom/feeds/misc.atom.xml @@ -4,46 +4,46 @@ Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/custom/feeds/misc.rss.xml b/pelican/tests/output/custom/feeds/misc.rss.xml index 03b3b2feb..7f5411c99 100644 --- a/pelican/tests/output/custom/feeds/misc.rss.xml +++ b/pelican/tests/output/custom/feeds/misc.rss.xml @@ -4,13 +4,13 @@ Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/second-article.htmlmiscfoobarbazUnbelievable !http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> +pelican.conf, it will …</p></section>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc diff --git a/pelican/tests/output/custom/feeds/yeah.atom.xml b/pelican/tests/output/custom/feeds/yeah.atom.xml index 0e5e88581..6158d962d 100644 --- a/pelican/tests/output/custom/feeds/yeah.atom.xml +++ b/pelican/tests/output/custom/feeds/yeah.atom.xml @@ -1,16 +1,14 @@ -Alexis' log - yeahhttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00A personal blog.This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +Alexis' log - yeahhttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00A personal blog.This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> +</section> diff --git a/pelican/tests/output/custom/feeds/yeah.rss.xml b/pelican/tests/output/custom/feeds/yeah.rss.xml index be592f111..99c5116c8 100644 --- a/pelican/tests/output/custom/feeds/yeah.rss.xml +++ b/pelican/tests/output/custom/feeds/yeah.rss.xml @@ -1,4 +1,4 @@ -Alexis' log - yeahhttp://blog.notmyidea.org/A personal blog.Sun, 17 Nov 2013 23:29:00 +0100This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported +Alexis' log - yeahhttp://blog.notmyidea.org/A personal blog.Sun, 17 Nov 2013 23:29:00 +0100This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobar diff --git a/pelican/tests/output/custom/index2.html b/pelican/tests/output/custom/index2.html index a1c3f5b56..c30ef57c9 100644 --- a/pelican/tests/output/custom/index2.html +++ b/pelican/tests/output/custom/index2.html @@ -96,7 +96,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more @@ -122,12 +122,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

read more

There are comments.

diff --git a/pelican/tests/output/custom/index3.html b/pelican/tests/output/custom/index3.html index 93e0d029a..40dba4eb1 100644 --- a/pelican/tests/output/custom/index3.html +++ b/pelican/tests/output/custom/index3.html @@ -49,15 +49,15 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+ +

Testing another case

This will now have a line number in 'custom' since it's the default in - pelican.conf, it will …

+ pelican.conf, it will …

read more

There are comments.

diff --git a/pelican/tests/output/custom/oh-yeah.html b/pelican/tests/output/custom/oh-yeah.html index 0825e2113..7d49859de 100644 --- a/pelican/tests/output/custom/oh-yeah.html +++ b/pelican/tests/output/custom/oh-yeah.html @@ -50,12 +50,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+
diff --git a/pelican/tests/output/custom/tag/bar.html b/pelican/tests/output/custom/tag/bar.html index 3abbc8331..e2c5e146c 100644 --- a/pelican/tests/output/custom/tag/bar.html +++ b/pelican/tests/output/custom/tag/bar.html @@ -71,7 +71,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more @@ -97,12 +97,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+ read more

There are comments.

diff --git a/pelican/tests/output/custom/tag/foo.html b/pelican/tests/output/custom/tag/foo.html index c03bca5cf..624bf1c2e 100644 --- a/pelican/tests/output/custom/tag/foo.html +++ b/pelican/tests/output/custom/tag/foo.html @@ -71,7 +71,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more diff --git a/pelican/tests/output/custom/tag/foobar.html b/pelican/tests/output/custom/tag/foobar.html index d3609714c..8cef3d75d 100644 --- a/pelican/tests/output/custom/tag/foobar.html +++ b/pelican/tests/output/custom/tag/foobar.html @@ -45,17 +45,15 @@

This is a supe

In yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+

There are comments.

diff --git a/pelican/tests/output/custom/tag/yeah.html b/pelican/tests/output/custom/tag/yeah.html index d04573905..cd3475eed 100644 --- a/pelican/tests/output/custom/tag/yeah.html +++ b/pelican/tests/output/custom/tag/yeah.html @@ -42,12 +42,12 @@

Oh yeah !

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

There are comments.

diff --git a/pelican/tests/output/custom/this-is-a-super-article.html b/pelican/tests/output/custom/this-is-a-super-article.html index 222fcbab8..795df61da 100644 --- a/pelican/tests/output/custom/this-is-a-super-article.html +++ b/pelican/tests/output/custom/this-is-a-super-article.html @@ -51,17 +51,15 @@

In yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+

diff --git a/pelican/tests/output/custom/unbelievable.html b/pelican/tests/output/custom/unbelievable.html index 0d88db617..38f479bce 100644 --- a/pelican/tests/output/custom/unbelievable.html +++ b/pelican/tests/output/custom/unbelievable.html @@ -49,36 +49,36 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+ +

Testing another case

This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 

Lovely.

-
-
+ +

Testing more sourcecode directives

 8def run(self):
self.assert_has_content()
10 try:
lexer = get_lexer_by_name(self.arguments[0])
12 except ValueError:
# no lexer found - use the text one instead of an exception
14 lexer = TextLexer()

16 if ('linenos' in self.options and
self.options['linenos'] not in ('table', 'inline')):
18 self.options['linenos'] = 'table'

20 for flag in ('nowrap', 'nobackground', 'anchorlinenos'):
if flag in self.options:
22 self.options[flag] = True

24 # noclasses should already default to False, but just in case...
formatter = HtmlFormatter(noclasses=False, **self.options)
26 parsed = highlight('\n'.join(self.content), lexer, formatter)
return [nodes.raw('', parsed, format='html')]

Lovely.

-
-
+ +

Testing even more sourcecode directives

formatter = self.options and VARIANTS[self.options.keys()[0]]

Lovely.

-
-
+ +

Testing overriding config defaults

Even if the default is line numbers, we can override it here

formatter = self.options and VARIANTS[self.options.keys()[0]]
 

Lovely.

-
+

diff --git a/pelican/tests/output/custom_locale/author/alexis-metaireau2.html b/pelican/tests/output/custom_locale/author/alexis-metaireau2.html index 0ba022b71..a1f67be50 100644 --- a/pelican/tests/output/custom_locale/author/alexis-metaireau2.html +++ b/pelican/tests/output/custom_locale/author/alexis-metaireau2.html @@ -96,7 +96,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more @@ -122,12 +122,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+ read more

There are comments.

diff --git a/pelican/tests/output/custom_locale/author/alexis-metaireau3.html b/pelican/tests/output/custom_locale/author/alexis-metaireau3.html index 5033e7f2f..fce1a072a 100644 --- a/pelican/tests/output/custom_locale/author/alexis-metaireau3.html +++ b/pelican/tests/output/custom_locale/author/alexis-metaireau3.html @@ -49,15 +49,15 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+ +

Testing another case

This will now have a line number in 'custom' since it's the default in - pelican.conf, it will …

+ pelican.conf, it will …

read more

There are comments.

diff --git a/pelican/tests/output/custom_locale/category/bar.html b/pelican/tests/output/custom_locale/category/bar.html index c061c8d83..584c0571d 100644 --- a/pelican/tests/output/custom_locale/category/bar.html +++ b/pelican/tests/output/custom_locale/category/bar.html @@ -42,12 +42,12 @@

Oh yeah !tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

There are comments.

diff --git a/pelican/tests/output/custom_locale/category/misc.html b/pelican/tests/output/custom_locale/category/misc.html index 8df30965c..132bd4e0e 100644 --- a/pelican/tests/output/custom_locale/category/misc.html +++ b/pelican/tests/output/custom_locale/category/misc.html @@ -93,15 +93,15 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+

+

Testing another case

This will now have a line number in 'custom' since it's the default in - pelican.conf, it will …

+ pelican.conf, it will …

read more

There are comments.

diff --git a/pelican/tests/output/custom_locale/category/yeah.html b/pelican/tests/output/custom_locale/category/yeah.html index 9e22f4f3a..79177ca9d 100644 --- a/pelican/tests/output/custom_locale/category/yeah.html +++ b/pelican/tests/output/custom_locale/category/yeah.html @@ -45,17 +45,15 @@

yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+

There are comments.

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 85b63173f..f33a345ee 100644 --- a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml +++ b/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml @@ -6,69 +6,67 @@ <a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/<p>Article 1</p> Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/<p>Article 2</p> Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported +This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> 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 f383a84da..3ae49c154 100644 --- a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml +++ b/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml @@ -6,24 +6,24 @@ <a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/cat1Article 1http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-1/<p>Article 1</p> Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/cat1Article 2http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-2/<p>Article 2</p> Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/cat1Article 3http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-3/<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/cat1This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported +Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/cat1This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/yeahfoobarfoobarOh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> +Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/yeahfoobarfoobarOh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/barohbaryeahUnbelievable !http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> +pelican.conf, it will …</p></section>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc 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 974b42799..79794e96e 100644 --- a/pelican/tests/output/custom_locale/feeds/all-en.atom.xml +++ b/pelican/tests/output/custom_locale/feeds/all-en.atom.xml @@ -6,69 +6,67 @@ <a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/<p>Article 1</p> Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/<p>Article 2</p> Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported +This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/custom_locale/feeds/all.atom.xml b/pelican/tests/output/custom_locale/feeds/all.atom.xml index c2a5ef38a..b8412c853 100644 --- a/pelican/tests/output/custom_locale/feeds/all.atom.xml +++ b/pelican/tests/output/custom_locale/feeds/all.atom.xml @@ -7,70 +7,68 @@ <a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/<p>Article 1</p> Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/<p>Article 2</p> Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported +This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> +</section> +Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Trop bien !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/custom_locale/feeds/all.rss.xml b/pelican/tests/output/custom_locale/feeds/all.rss.xml index 9642bef9d..2fdb404a2 100644 --- a/pelican/tests/output/custom_locale/feeds/all.rss.xml +++ b/pelican/tests/output/custom_locale/feeds/all.rss.xml @@ -7,25 +7,25 @@ <a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/cat1Article 1http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-1/<p>Article 1</p> Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/cat1Article 2http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-2/<p>Article 2</p> Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/cat1Article 3http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-3/<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/cat1This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported +Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/cat1This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/yeahfoobarfoobarOh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> +Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/yeahfoobarfoobarOh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/barohbaryeahTrop bien !http://blog.notmyidea.org/oh-yeah-fr.html<p>Et voila du contenu en français</p> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.htmlmiscUnbelievable !http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> +pelican.conf, it will …</p></section>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc diff --git a/pelican/tests/output/custom_locale/feeds/bar.atom.xml b/pelican/tests/output/custom_locale/feeds/bar.atom.xml index f3d8cc1e4..cff65aaa9 100644 --- a/pelican/tests/output/custom_locale/feeds/bar.atom.xml +++ b/pelican/tests/output/custom_locale/feeds/bar.atom.xml @@ -1,8 +1,8 @@ -Alexis' log - barhttp://blog.notmyidea.org/2010-10-20T10:14:00+02:00Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> +Alexis' log - barhttp://blog.notmyidea.org/2010-10-20T10:14:00+02:00Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> diff --git a/pelican/tests/output/custom_locale/feeds/bar.rss.xml b/pelican/tests/output/custom_locale/feeds/bar.rss.xml index 71130b31b..414462478 100644 --- a/pelican/tests/output/custom_locale/feeds/bar.rss.xml +++ b/pelican/tests/output/custom_locale/feeds/bar.rss.xml @@ -1,8 +1,8 @@ -Alexis' log - barhttp://blog.notmyidea.org/Wed, 20 Oct 2010 10:14:00 +0200Oh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> +Alexis' log - barhttp://blog.notmyidea.org/Wed, 20 Oct 2010 10:14:00 +0200Oh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<section id="why-not"> <h2>Why not ?</h2> <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> +</section> Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/barohbaryeah diff --git a/pelican/tests/output/custom_locale/feeds/misc.atom.xml b/pelican/tests/output/custom_locale/feeds/misc.atom.xml index 4898ab843..d5fac1d31 100644 --- a/pelican/tests/output/custom_locale/feeds/misc.atom.xml +++ b/pelican/tests/output/custom_locale/feeds/misc.atom.xml @@ -4,46 +4,46 @@ Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> +pelican.conf, it will …</p></section><p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.</p> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> +</section> +<section id="testing-more-sourcecode-directives"> <h2>Testing more sourcecode directives</h2> <div class="highlight"><pre><span></span><span id="foo-8"><a id="foo-8" name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><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 id="foo-9" name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <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 id="foo-10" name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a id="foo-11" name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <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 id="foo-12" name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a id="foo-13" name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a id="foo-14" name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <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 id="foo-15" name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a id="foo-16" name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <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 id="foo-17" name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <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 id="foo-18" name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <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 id="foo-19" name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a id="foo-20" name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <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 id="foo-21" name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <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 id="foo-22" name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a id="foo-23" name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a id="foo-24" name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a id="foo-25" name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a id="foo-26" name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a id="foo-27" name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> <p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> +</section> +<section id="testing-even-more-sourcecode-directives"> <h2>Testing even more sourcecode directives</h2> <span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> <p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> +</section> +<section id="testing-overriding-config-defaults"> <h2>Testing overriding config defaults</h2> <p>Even if the default is line numbers, we can override it here</p> <div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div> <p>Lovely.</p> -</div> +</section> The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> diff --git a/pelican/tests/output/custom_locale/feeds/misc.rss.xml b/pelican/tests/output/custom_locale/feeds/misc.rss.xml index d1493ae89..0ab1ff6cd 100644 --- a/pelican/tests/output/custom_locale/feeds/misc.rss.xml +++ b/pelican/tests/output/custom_locale/feeds/misc.rss.xml @@ -4,13 +4,13 @@ Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/posts/2012/février/29/second-article/miscfoobarbazUnbelievable !http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> <p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> <a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> +<section id="testing-sourcecode-directive"> <h2>Testing sourcecode directive</h2> <div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> </pre></div></td></tr></table></div> -</div> -<div class="section" id="testing-another-case"> +</section> +<section id="testing-another-case"> <h2>Testing another case</h2> <p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> +pelican.conf, it will …</p></section>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc diff --git a/pelican/tests/output/custom_locale/feeds/yeah.atom.xml b/pelican/tests/output/custom_locale/feeds/yeah.atom.xml index f316ada56..17c7f6233 100644 --- a/pelican/tests/output/custom_locale/feeds/yeah.atom.xml +++ b/pelican/tests/output/custom_locale/feeds/yeah.atom.xml @@ -1,16 +1,14 @@ -Alexis' log - yeahhttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported +Alexis' log - yeahhttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> <p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> +<section id="this-is-a-simple-title"> <h2>This is a simple title</h2> <p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> <img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> +<pre class="literal-block">&gt;&gt;&gt; from ipdb import set_trace +&gt;&gt;&gt; set_trace()</pre> <p>→ And now try with some utf8 hell: ééé</p> -</div> +</section> diff --git a/pelican/tests/output/custom_locale/feeds/yeah.rss.xml b/pelican/tests/output/custom_locale/feeds/yeah.rss.xml index a0d0ba280..9e159a798 100644 --- a/pelican/tests/output/custom_locale/feeds/yeah.rss.xml +++ b/pelican/tests/output/custom_locale/feeds/yeah.rss.xml @@ -1,4 +1,4 @@ -Alexis' log - yeahhttp://blog.notmyidea.org/Sun, 17 Nov 2013 23:29:00 +0100This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported +Alexis' log - yeahhttp://blog.notmyidea.org/Sun, 17 Nov 2013 23:29:00 +0100This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p>Multi-line metadata should be supported as well as <strong>inline markup</strong>.</p> Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/yeahfoobarfoobar diff --git a/pelican/tests/output/custom_locale/index2.html b/pelican/tests/output/custom_locale/index2.html index 68d4f1956..2ef0edef5 100644 --- a/pelican/tests/output/custom_locale/index2.html +++ b/pelican/tests/output/custom_locale/index2.html @@ -96,7 +96,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more @@ -122,12 +122,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

read more

There are comments.

diff --git a/pelican/tests/output/custom_locale/index3.html b/pelican/tests/output/custom_locale/index3.html index 030ea0723..483ed42d4 100644 --- a/pelican/tests/output/custom_locale/index3.html +++ b/pelican/tests/output/custom_locale/index3.html @@ -49,15 +49,15 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+ +

Testing another case

This will now have a line number in 'custom' since it's the default in - pelican.conf, it will …

+ pelican.conf, it will …

read more

There are comments.

diff --git "a/pelican/tests/output/custom_locale/posts/2010/d\303\251cembre/02/this-is-a-super-article/index.html" "b/pelican/tests/output/custom_locale/posts/2010/d\303\251cembre/02/this-is-a-super-article/index.html" index 336a13cfe..66220752b 100644 --- "a/pelican/tests/output/custom_locale/posts/2010/d\303\251cembre/02/this-is-a-super-article/index.html" +++ "b/pelican/tests/output/custom_locale/posts/2010/d\303\251cembre/02/this-is-a-super-article/index.html" @@ -51,17 +51,15 @@

In yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+
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 a57881712..8145e882d 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 @@ -49,36 +49,36 @@

Or completely awesome. Depends the needs.

a root-relative link to markdown-article a file-relative link to markdown-article

-
+

Testing sourcecode directive

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 
-
-
+ +

Testing another case

This will now have a line number in 'custom' since it's the default in pelican.conf, it will have nothing in default.

1
formatter = self.options and VARIANTS[self.options.keys()[0]]
 

Lovely.

-
-
+ +

Testing more sourcecode directives

 8def run(self):
self.assert_has_content()
10 try:
lexer = get_lexer_by_name(self.arguments[0])
12 except ValueError:
# no lexer found - use the text one instead of an exception
14 lexer = TextLexer()

16 if ('linenos' in self.options and
self.options['linenos'] not in ('table', 'inline')):
18 self.options['linenos'] = 'table'

20 for flag in ('nowrap', 'nobackground', 'anchorlinenos'):
if flag in self.options:
22 self.options[flag] = True

24 # noclasses should already default to False, but just in case...
formatter = HtmlFormatter(noclasses=False, **self.options)
26 parsed = highlight('\n'.join(self.content), lexer, formatter)
return [nodes.raw('', parsed, format='html')]

Lovely.

-
-
+ +

Testing even more sourcecode directives

formatter = self.options and VARIANTS[self.options.keys()[0]]

Lovely.

-
-
+ +

Testing overriding config defaults

Even if the default is line numbers, we can override it here

formatter = self.options and VARIANTS[self.options.keys()[0]]
 

Lovely.

-
+

diff --git a/pelican/tests/output/custom_locale/posts/2010/octobre/20/oh-yeah/index.html b/pelican/tests/output/custom_locale/posts/2010/octobre/20/oh-yeah/index.html index 23c577858..5d966c9d3 100644 --- a/pelican/tests/output/custom_locale/posts/2010/octobre/20/oh-yeah/index.html +++ b/pelican/tests/output/custom_locale/posts/2010/octobre/20/oh-yeah/index.html @@ -50,12 +50,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

diff --git a/pelican/tests/output/custom_locale/tag/bar.html b/pelican/tests/output/custom_locale/tag/bar.html index f8edf2f2c..86968472e 100644 --- a/pelican/tests/output/custom_locale/tag/bar.html +++ b/pelican/tests/output/custom_locale/tag/bar.html @@ -71,7 +71,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more @@ -97,12 +97,12 @@

tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+ read more

There are comments.

diff --git a/pelican/tests/output/custom_locale/tag/foo.html b/pelican/tests/output/custom_locale/tag/foo.html index 688666f8a..146a930d0 100644 --- a/pelican/tests/output/custom_locale/tag/foo.html +++ b/pelican/tests/output/custom_locale/tag/foo.html @@ -71,7 +71,7 @@

In yeah.

tags: foo bar foobar

-

Multi-line metadata should be supported +

Multi-line metadata should be supported as well as inline markup.

read more diff --git a/pelican/tests/output/custom_locale/tag/foobar.html b/pelican/tests/output/custom_locale/tag/foobar.html index 6abc2d24c..64395e9c5 100644 --- a/pelican/tests/output/custom_locale/tag/foobar.html +++ b/pelican/tests/output/custom_locale/tag/foobar.html @@ -45,17 +45,15 @@

yeah.

tags: foo bar foobar

Some content here !

-
+

This is a simple title

And here comes the cool stuff.

alternate text alternate text -
->>> from ipdb import set_trace
->>> set_trace()
-
+
>>> from ipdb import set_trace
+>>> set_trace()

→ And now try with some utf8 hell: ééé

-
+

There are comments.

diff --git a/pelican/tests/output/custom_locale/tag/yeah.html b/pelican/tests/output/custom_locale/tag/yeah.html index b0a1a5ac7..9e7cdd766 100644 --- a/pelican/tests/output/custom_locale/tag/yeah.html +++ b/pelican/tests/output/custom_locale/tag/yeah.html @@ -42,12 +42,12 @@

Oh yeah !tags: oh bar yeah

Translations: fr -
+

Why not ?

After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! YEAH !

alternate text -
+

There are comments.

diff --git a/pelican/tests/test_readers.py b/pelican/tests/test_readers.py index 68938a83a..a897c7232 100644 --- a/pelican/tests/test_readers.py +++ b/pelican/tests/test_readers.py @@ -147,7 +147,7 @@ def test_article_with_metadata(self): "category": "yeah", "author": "Alexis Métaireau", "title": "This is a super article !", - "summary": '

Multi-line metadata should be' + "summary": "

Multi-line metadata should be" " supported\nas well as inline" " markup and stuff to "typogrify" ""...

\n", @@ -165,7 +165,7 @@ def test_article_with_capitalized_metadata(self): "category": "yeah", "author": "Alexis Métaireau", "title": "This is a super article !", - "summary": '

Multi-line metadata should be' + "summary": "

Multi-line metadata should be" " supported\nas well as inline" " markup and stuff to "typogrify" ""...

\n", @@ -387,7 +387,7 @@ def test_typogrify_summary(self): # unmodified page = self.read_file(path="article_with_metadata.rst") expected = ( - '

Multi-line metadata should be' + "

Multi-line metadata should be" " supported\nas well as inline" " markup and stuff to "typogrify" ""...

\n" @@ -399,7 +399,7 @@ def test_typogrify_summary(self): # otherwise, typogrify should be applied page = self.read_file(path="article_with_metadata.rst", TYPOGRIFY=True) expected = ( - '

Multi-line metadata should be' + "

Multi-line metadata should be" " supported\nas well as inline" " markup and stuff to “typogrify" "”…

\n" @@ -435,8 +435,9 @@ def test_typogrify_ignore_tags(self): 'x' ' &' ' y\n\n' - "

A block quote:

\n
\nx " - '& y
\n' + "

A block quote:

\n
\n

x " + '& y

\n' + "
\n" "

Normal:\nx" ' &' " y" @@ -458,8 +459,8 @@ def test_typogrify_ignore_tags(self): 'x' ' &' ' y\n\n' - "

A block quote:

\n
\nx " - "& y
\n" + "

A block quote:

\n
\n

x " + "& y

\n
\n" "

Normal:\nx" ' &' " y"