rspress-plugin-supersub
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

rspress-plugin-supersub NPM Version

简体中文

Rspress plugin to add superscript(<super></super>) and subscript(<sub></sub>) support.

NOTE: The common subscript syntax ~ conflicts with the delete syntax(<del></del>), which is more commonly used, so this plugin uses _ as the subscript syntax, and you can also modify the superscript and subscript through configuration.

- 2^10^
- a^2^ + b^2^ = c^2^
- H_2_O
- Almost every developer's favorite molecule is C*8_H_10_N_4_O_2*, also known as "caffeine."
sample

Usage

npm i rspress-plugin-supersub
pnpm add rspress-plugin-supersub
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import supersub from 'rspress-plugin-supersub';

export default defineConfig({
  root: path.join(__dirname, 'docs'),
  plugins: [supersub()],
});

Configure

superSyntax

Define the syntax for superscript.

  • Type: string
  • Default: ^ (matching ^sup^)

subSyntax

Define the syntax for subscript.

  • Type: string
  • Default: _ (matching _sub_)

Package Sidebar

Install

npm i rspress-plugin-supersub

Weekly Downloads

32

Version

0.3.0

License

MIT

Unpacked Size

8.26 kB

Total Files

8

Last publish

Collaborators

  • linbudu