Summary Files Commits Branches @commit @diff @stats
path: root / docs / elements / code.html
diff options
context:
space:
mode:
Commitb777a03857cba6322929e3f11a4bb14d0338d160 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2018-11-14 14:43:30 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2018-11-14 14:43:30 +0800
Files01717734622d0a07907cdf25eb7135a50478a10e /docs/elements/code.html
Spectre-Dark-Gruvbox-b777a03857cba6322929e3f11a4bb14d0338d160.tar
Spectre-Dark-Gruvbox-b777a03857cba6322929e3f11a4bb14d0338d160.tar.gz
Spectre-Dark-Gruvbox-b777a03857cba6322929e3f11a4bb14d0338d160.zip
Parent26d3d62515b3911f6a3f87e6161b9491cb02d8de (diff)
Update Docs examples
1 files changed, 7 insertions, 2 deletions
-rw-r--r--docs/elements/code.html9
diff --git a/docs/elements/code.html b/docs/elements/code.html
index 40988a3..fe9ec24 100644
--- a/docs/elements/code.html
+++ b/docs/elements/code.html
@@ -202,8 +202,13 @@
</div>
</div>
<p>Code is used for styling inline and multiline code snippets.</p>
- <p>For inline code, you can use the &lt;code&gt; element.
- For multiline code snippet blocks, you can use &lt;pre&gt; with the <code>code</code> class as a container, and add &lt;code&gt; inside it.
+ <h4 class="s-subtitle" id="code-inline">Inline code<a class="anchor" href="#code-inline" aria-hidden="true">#</a></h4>
+ <pre class="code" data-lang="HTML"><code><span class="hljs-comment">&lt;!-- inline code --&gt;</span>
+<span class="hljs-tag">&lt;<span class="hljs-name">code</span>&gt;</span>code<span class="hljs-tag">&lt;/<span class="hljs-name">code</span>&gt;</span>
+</code></pre>
+ <p>For inline code, you can use the &lt;code&gt; element. </p>
+ <h4 class="s-subtitle" id="code-snippet">Code snippet<a class="anchor" href="#code-snippet" aria-hidden="true">#</a></h4>
+ <p>For multiline code snippet blocks, you can use &lt;pre&gt; with the <code>code</code> class as a container, and add &lt;code&gt; inside it.
The <code>data-lang</code> attribute is rendered as the language name in the top right.
</p>
<pre class="code" data-lang="HTML"><code><span class="hljs-comment">&lt;!-- code snippets --&gt;</span>