The doctest directive example code blocks on the doctest documentation page do not contain the described directives (<a href="http://docs.python.org/library/doctest.html">http://docs.python.org/library/doctest.html</a>) , approximately 1/3 of the way down the page.<br>

<br>Perhaps sphinx or  is hiding all python doctest string comments and processing the doctest directives rather than displaying the raw code block? The html source shows no sign of the mentioned directives:<br><br>    &lt;p&gt;For example, this test passes:&lt;/p&gt;<br>

    &lt;div class=&quot;highlight-python&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;gp&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; <br>

    &lt;span class=&quot;go&quot;&gt;[0,   1,  2,  3,  4,  5,  6,  7,  8,  9,&lt;/span&gt;<br><br>But the rst file at cpython/Docs/Library/doctest.rst does contain the doctest directive (as a comment):<br><br>For example, this test passes::<br>

<br>    &gt;&gt;&gt; print(list(range(20))) #doctest: +NORMALIZE_WHITESPACE<br>    [0,   1,  2,  3,  4,  5,  6,  7,  8,  9,<br><br>Here&#39;s the faulty rendering on a Chrome browser in Ubuntu:<p style="text-align:left;line-height:20px;font-family:sans-serif;font-size:16px;background-color:rgb(255,255,255)">

... Use <tt class="docutils literal" style="background-color:rgb(236,240,243);padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:0.95em"><span class="pre">+</span></tt> to enable the named behavior, or <tt class="docutils literal" style="background-color:rgb(236,240,243);padding-top:0px;padding-right:1px;padding-bottom:0px;padding-left:1px;font-size:0.95em"><span class="pre">-</span></tt> to disable it.</p>

<p style="text-align:justify;line-height:20px;font-family:sans-serif;font-size:16px;background-color:rgb(255,255,255)">For example, this test passes:</p><div class="highlight-python" style="font-family:sans-serif;font-size:16px;background-color:rgb(255,255,255)">

<div class="highlight" style="background-color:rgb(238,255,204);background-image:initial;background-repeat:initial initial"><span class="copybutton" title="Hide the prompts and output" style="border-top-color:rgb(170,204,153);border-right-color:rgb(170,204,153);border-bottom-color:rgb(170,204,153);border-left-color:rgb(170,204,153);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;color:rgb(170,204,153);font-family:monospace;padding-left:0.2em;padding-right:0.2em">&gt;&gt;&gt;</span><pre style="overflow-x:auto;overflow-y:hidden;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;color:rgb(51,51,51);line-height:15px;border-top-width:1px;border-bottom-width:1px;border-top-style:solid;border-bottom-style:solid;border-top-color:rgb(170,204,153);border-bottom-color:rgb(170,204,153);border-left-style:none;border-left-width:initial;border-left-color:initial;border-right-style:none;border-right-width:initial;border-right-color:initial">

<span class="gp" style="color:rgb(198,93,9);font-weight:bold">&gt;&gt;&gt; </span><span class="k" style="color:rgb(0,112,32);font-weight:bold">print</span> <span class="nb" style="color:rgb(0,112,32)">range</span><span class="p">(</span><span class="mi" style="color:rgb(32,128,80)">20</span><span class="p">)</span> 
<span class="go" style="color:rgb(48,48,48)">[0,   1,  2,  3,  4,  5,  6,  7,  8,  9,</span>
<span class="go" style="color:rgb(48,48,48)">10,  11, 12, 13, 14, 15, 16, 17, 18, 19]</span></pre></div></div>