mirror of https://github.com/zulip/zulip.git
Tweak code block examples
(imported from commit 4790e217320ad2dae0b85216321b11755b0ba88c)
This commit is contained in:
parent
3e2acd1c50
commit
3d3e88ad2d
|
@ -46,30 +46,26 @@
|
|||
<td>Some inline <code>code</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>~~~<br />
|
||||
def bah():<br/>
|
||||
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/>
|
||||
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">
|
||||
|
|
|
@ -27,6 +27,10 @@ a:hover code {
|
|||
border-color: #005580;
|
||||
}
|
||||
|
||||
.preserve_spaces {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
background-color: white;
|
||||
padding: 0.5em;
|
||||
|
|
Loading…
Reference in New Issue