showdown/test/cases/github-style-codeblock.html

20 lines
493 B
HTML
Raw Normal View History

2012-06-14 13:05:31 +08:00
<p>Define a function in javascript:</p>
<pre><code>function MyFunc(a) {
2015-01-19 19:37:21 +08:00
var s = '`';
}
2012-06-14 13:05:31 +08:00
</code></pre>
2012-06-14 13:43:46 +08:00
<p>And some HTML</p>
<pre><code class="html language-html">&lt;div&gt;HTML!&lt;/div&gt;
2015-01-16 05:21:33 +08:00
</code></pre>
<p>And some CSS with spaces before the language declaration</p>
<pre><code class="css language-css">body {
font-size: 1.5em;
}
</code></pre>
<p>Use more than 3 backticks</p>
<pre><code>some code
</code></pre>
<p>Use tilde as delimiter</p>
<pre><code>another piece of code
</code></pre>