Summary Files Commits Branches @commit @diff @stats
path: root / docs / src / elements / code.pug
diff options
context:
space:
mode:
Commit81ee834ec6914f8b284e0724d541ed927513e6bd (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2018-11-20 11:54:48 +0800
Committer
 GitHub <noreply@github.com>
2018-11-20 11:54:48 +0800
Filesac0c29f2a5fa344bb7a05638602dd6dc60ce9e37 /docs/src/elements/code.pug
Spectre-Dark-Gruvbox-81ee834ec6914f8b284e0724d541ed927513e6bd.tar
Spectre-Dark-Gruvbox-81ee834ec6914f8b284e0724d541ed927513e6bd.tar.gz
Spectre-Dark-Gruvbox-81ee834ec6914f8b284e0724d541ed927513e6bd.zip
Parentca1bdc5d86edb4d1baf3e9d1fabc89977950a2b4 (diff)
Parentba4c380af32bc75dad1e03c2386b5f8a3fb9118f (diff)
Merge pull request #534 from picturepan2/0.5.6 v0.5.6
0.5.6
1 files changed, 13 insertions, 0 deletions
-rw-r--r--docs/src/elements/code.pug13
diff --git a/docs/src/elements/code.pug b/docs/src/elements/code.pug
index 894b617..920fea9 100644
--- a/docs/src/elements/code.pug
+++ b/docs/src/elements/code.pug
@@ -11,8 +11,21 @@ block docs-content
include ../_layout/_ad-g.pug
p Code is used for styling inline and multiline code snippets.
+
+ +docs-subheading('code-inline', 'Inline code')
+
+ pre.code(data-lang='HTML')
+ code
+ :highlight(lang="html")
+ <!-- inline code -->
+ <code>code</code>
+
p
| For inline code, you can use the #{'<code>'} element.
+
+ +docs-subheading('code-snippet', 'Code snippet')
+
+ p
| For multiline code snippet blocks, you can use #{'<pre>'} with the #[code code] class as a container, and add #{'<code>'} inside it.
| The #[code data-lang] attribute is rendered as the language name in the top right.