Skip to content

Commit e260042

Browse files
committed
minor: support dispose of termProccessor
1 parent d74db08 commit e260042

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rehype-proc-term.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export type TermProcessorProtocol = {
2020
readonly processText: (
2121
text: string,
2222
) => TextProcessed | Promise<TextProcessed>;
23+
[Symbol.dispose]?: () => void;
2324
};
2425

2526
export type RehypeProcTermPluginParams = {
@@ -99,6 +100,7 @@ const rehypeProcTerm: RehypeProcTermPlugin = ({ termProcessor }) => {
99100

100101
return STEP_OVER;
101102
});
103+
termProcessor[Symbol.dispose]?.();
102104
};
103105
};
104106

0 commit comments

Comments
 (0)