Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
remark-supersub
Advanced tools
Readme
Remark plugin for adding support for pandoc-style superscript and subscript syntax to Markdown.
Adds two new node types to MDAST: superscript
and subscript
.
When using rehype, these will be stringified as sup
and sub
respectively.
This package is ESM only:
Node 12+ is needed to use it and it must be import
ed instead of require
d.
npm:
npm install remark-supersub
21^st^ Century
H~2~O
The example above will yield:
{
type: 'paragraph',
children: [
{
type: 'text',
value: '21'
},
{
type: 'superscript',
children: [{
type: 'text',
value: 'st'
}]
},
{
type: 'text',
value: ' Century'
}
]
}
...
{
type: 'paragraph',
children: [
{
type: 'text',
value: 'H'
},
{
type: 'subscript',
children: [{
type: 'text',
value: '2'
}]
},
{
type: 'text',
value: 'O'
}
]
}
import { unified } from 'unified'
import markdown from 'remark-parse'
import html from 'rehype-stringify'
import remark2rehype from 'remark-rehype'
import supersub from 'remark-supersub'
unified()
.use(markdown)
.use(supersub)
.use(remark2rehype)
.use(html)
MIT © Alex Shaw
FAQs
Remark plugin for adding subscript/superscript syntax.
The npm package remark-supersub receives a total of 7,722 weekly downloads. As such, remark-supersub popularity was classified as popular.
We found that remark-supersub demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.