Skip to content

Commit e445b5d

Browse files
committed
fix(math): name
1 parent 50eb150 commit e445b5d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

packages/plugin-math-lazy/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { BytemdPlugin } from 'bytemd';
33
import remarkMath from 'remark-math';
44
import { KatexOptions } from 'katex';
55

6-
export interface MathOptions {
6+
export interface MathLazyOptions {
77
inlineMathDouble?: boolean;
88
katexOptions?: Omit<KatexOptions, 'displayMode'>;
99
}
1010

11-
export default function math({
11+
export default function mathLazy({
1212
inlineMathDouble,
1313
katexOptions,
14-
}: MathOptions = {}): BytemdPlugin {
14+
}: MathLazyOptions = {}): BytemdPlugin {
1515
return {
1616
remark: (u) => u.use(remarkMath, { inlineMathDouble }),
1717
viewerEffect(el) {

packages/plugin-math/src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ import { BytemdPlugin } from 'bytemd';
33
import remarkMath from 'remark-math';
44
// @ts-ignore
55
import rehypeKatex from 'rehype-katex';
6-
import { KatexOptions } from 'katex';
76

87
export interface MathOptions {
98
inlineMathDouble?: boolean;
10-
katex?: Omit<KatexOptions, 'displayMode'>;
9+
katexOptions?: Omit<katex.KatexOptions, 'displayMode'>;
1110
}
1211

1312
export default function math({
1413
inlineMathDouble,
15-
katex,
14+
katexOptions,
1615
}: MathOptions = {}): BytemdPlugin {
1716
return {
1817
remark: (u) => u.use(remarkMath, { inlineMathDouble }),
19-
rehype: (u) => u.use(rehypeKatex, katex),
18+
rehype: (u) => u.use(rehypeKatex, katexOptions),
2019
};
2120
}

0 commit comments

Comments
 (0)