File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ import { BytemdPlugin } from 'bytemd';
3
3
import remarkMath from 'remark-math' ;
4
4
import { KatexOptions } from 'katex' ;
5
5
6
- export interface MathOptions {
6
+ export interface MathLazyOptions {
7
7
inlineMathDouble ?: boolean ;
8
8
katexOptions ?: Omit < KatexOptions , 'displayMode' > ;
9
9
}
10
10
11
- export default function math ( {
11
+ export default function mathLazy ( {
12
12
inlineMathDouble,
13
13
katexOptions,
14
- } : MathOptions = { } ) : BytemdPlugin {
14
+ } : MathLazyOptions = { } ) : BytemdPlugin {
15
15
return {
16
16
remark : ( u ) => u . use ( remarkMath , { inlineMathDouble } ) ,
17
17
viewerEffect ( el ) {
Original file line number Diff line number Diff line change @@ -3,19 +3,18 @@ import { BytemdPlugin } from 'bytemd';
3
3
import remarkMath from 'remark-math' ;
4
4
// @ts -ignore
5
5
import rehypeKatex from 'rehype-katex' ;
6
- import { KatexOptions } from 'katex' ;
7
6
8
7
export interface MathOptions {
9
8
inlineMathDouble ?: boolean ;
10
- katex ?: Omit < KatexOptions , 'displayMode' > ;
9
+ katexOptions ?: Omit < katex . KatexOptions , 'displayMode' > ;
11
10
}
12
11
13
12
export default function math ( {
14
13
inlineMathDouble,
15
- katex ,
14
+ katexOptions ,
16
15
} : MathOptions = { } ) : BytemdPlugin {
17
16
return {
18
17
remark : ( u ) => u . use ( remarkMath , { inlineMathDouble } ) ,
19
- rehype : ( u ) => u . use ( rehypeKatex , katex ) ,
18
+ rehype : ( u ) => u . use ( rehypeKatex , katexOptions ) ,
20
19
} ;
21
20
}
You can’t perform that action at this time.
0 commit comments