Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/overflowcat/remark-samp-kbd
Add <samp>, <kbd> and <var> support to Markdown using remark
https://github.com/overflowcat/remark-samp-kbd
markdown plugin remark
Last synced: 16 days ago
JSON representation
Add <samp>, <kbd> and <var> support to Markdown using remark
- Host: GitHub
- URL: https://github.com/overflowcat/remark-samp-kbd
- Owner: OverflowCat
- License: wtfpl
- Created: 2023-11-13T11:06:27.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-18T05:45:48.000Z (12 months ago)
- Last Synced: 2023-11-18T07:29:05.840Z (12 months ago)
- Topics: markdown, plugin, remark
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ``remark-samp-kbd``
`remark-samp-kbd` is a [remark](https://github.com/remarkjs/remark/) plugin
thats add semantic distinctions between
code fragments (``),
program outputs (``),
keyboard keys (``),
and variables (``)
by using different numbers of backticks.## Features
- **Code Fragments ([`
`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code)):** 4k+1 for inline code references.
- **Program Outputs ([``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp)):** 4k+2 backticks, suitable for displaying names, paths, URIs (if not made a link) and any program output.
- **Keyboard Keys ([``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd)):** 4k+3 backticks to denote key strokes.
- **Mathematical Variables ([``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var)):** 4k+4 for variables.(Here, k is a non-negative integer.)
## Attribution
This plugin is inspired by [@GeeLaw](https://github.com/GeeLaw)'s [blog(post)](https://geelaw.blog/entries/meta-blog/#:~:text=Use%204k%2B1%20to%204k%2B4%20numbers%20of%20%60%20to%20represent%20different%20semantics).
> To remember this rule, remember that longer tag uses fewer backticks, and for the same length, the order is the lexicographical order.
## License
[WTFPL](./LICENSE).