remark-samp-kbd
v0.1.2
Published
Add <samp>, <kbd> and <var> support to Markdown using remark
Downloads
40
Readme
remark-samp-kbd
remark-samp-kbd
is a remark plugin
thats add semantic distinctions between
code fragments (<code>
),
program outputs (<samp>
),
keyboard keys (<kbd>
),
and variables (<var>
)
by using different numbers of backticks.
Features
- Code Fragments (
<code>
): 4k+1 for inline code references. - Program Outputs (
<samp>
): 4k+2 backticks, suitable for displaying names, paths, URIs (if not made a link) and any program output. - Keyboard Keys (
<kbd>
): 4k+3 backticks to denote key strokes. - Mathematical Variables (
<var>
): 4k+4 for variables.
(Here, k is a non-negative integer.)
Attribution
This plugin is inspired by @GeeLaw's blog(post).
To remember this rule, remember that longer tag uses fewer backticks, and for the same length, the order is the lexicographical order.