Tweak code block examples

(imported from commit 4790e217320ad2dae0b85216321b11755b0ba88c)
This commit is contained in:
Keegan McAllister 2012-11-29 12:38:18 -05:00
parent 3e2acd1c50
commit 3d3e88ad2d
2 changed files with 13 additions and 13 deletions

View File

@ -46,30 +46,26 @@
<td>Some inline <code>code</code></td>
</tr>
<tr>
<td>~~~<br />
def bah():<br/>
&nbsp;&nbsp;&nbsp;&nbsp;print "Humbug"<br/>
~~~<br/>
</td>
<td class="preserve_spaces">~~~
def bah():
print "Humbug"
~~~</td>
<td><pre>def bah():
print "Humbug"</pre></td>
</tr>
<tr>
<td>~~~ .py<br />
def bah():<br/>
&nbsp;&nbsp;&nbsp;&nbsp;print "Humbug"<br/>
~~~<br/>
</td>
<td class="preserve_spaces">~~~ .py
def bah():
print "Humbug"
~~~</td>
<td>
<div class="codehilite"><pre><span class="k">def</span> <span class="nf">bah</span><span class="p">():</span>
<span class="k">print</span> <span class="s">"Humbug"</span></pre></div>
</td>
</tr>
<tr>
<td colspan="2">(Indenting each line four spaces also creates a code block.)</td>
</tr>
</tbody>
</table>
<p>You can also make a code block by indenting each line with 4 spaces.</p>
</div>
</div>
<div class="modal-footer">

View File

@ -27,6 +27,10 @@ a:hover code {
border-color: #005580;
}
.preserve_spaces {
white-space: pre-wrap;
}
.sidebar-nav {
background-color: white;
padding: 0.5em;