mirror of
https://github.com/wassname/template.git
synced 2026-06-27 22:24:10 +08:00
Normalizes indents within code blocks
This commit is contained in:
+8
-16
@@ -41,34 +41,26 @@
|
||||
<h2>Markdown</h2>
|
||||
<div>
|
||||
<div dt-markdown>Any element with a `dt-markdown` attribute will be rendered with its contents replaced with a markdown processed version. We use [marked](https://github.com/chjj/marked), with [github flavored markdown](https://help.github.com/articles/basic-writing-and-formatting-syntax/) and [smartypants](https://daringfireball.net/projects/smartypants/).</div>
|
||||
<pre><code class="language-html">
|
||||
<dt-code block language="html">
|
||||
<div dt-markdown>
|
||||
###This markdown will be rendered as HTML
|
||||
|
||||
For more about markdown, read this [tutorial](https://help.github.com/articles/basic-writing-and-formatting-syntax/).
|
||||
</div>
|
||||
|
||||
</code></pre>
|
||||
</dt-code>
|
||||
</div>
|
||||
<hr>
|
||||
<h2>Code Blocks</h2>
|
||||
<p>Syntax highlighting is provided within <code class="language-html"><code></code> tags. Just wrap the source with this: <code class="language-html"><code class="language-html">let x = 10;</code></code>. For larger blocks of code, add a <code class="language-html"><pre></code> tag:</p>
|
||||
<pre><code class="language-html">
|
||||
<pre><code class="language-javascript">
|
||||
<p>Syntax highlighting is provided within <dt-code language="html"><dt-code></dt-code> tags. An example of inline code snippets: <dt-code language="html"><dt-code language="html">let x = 10;</dt-code></dt-code>. For larger blocks of code, add a <dt-code>block</dt-code> attribute:</p>
|
||||
<dt-code block language="html">
|
||||
<dt-code block language="javascript">
|
||||
var x = 25;
|
||||
function(x){
|
||||
return x * x;
|
||||
}
|
||||
</code></pre>
|
||||
</code></pre>
|
||||
<p>You can also use code blocks within markdown blocks. For instance: </p>
|
||||
<pre><code class="language-html">
|
||||
<div dt-markdown>
|
||||
```javascript
|
||||
let x = 25;
|
||||
```
|
||||
</div>
|
||||
</code></pre>
|
||||
</dt-code>
|
||||
</dt-code>
|
||||
<hr>
|
||||
<h2>Citation</h2>
|
||||
<p>Bibtex is the supported way of making academic citations. You first need have a global definition of all your possible citations. This can either be inlined in the document, or it can reference an external bibtex file.</p>
|
||||
@@ -92,7 +84,7 @@
|
||||
}
|
||||
</dt-bibliography>
|
||||
</code></pre>
|
||||
<p>Citations are then used with the <code class="language-html"><dt-cite></code> tag.</p>
|
||||
<p>Citations are then used with the <dt-code language="html"><dt-cite></dt-code> tag.</p>
|
||||
<pre><code class="language-html">
|
||||
<dt-cite>gregor2015draw</dt-cite>
|
||||
</code></pre>
|
||||
|
||||
Reference in New Issue
Block a user