Skip to content

Commit 150f3df

Browse files
committed
fix: release memory after use
1 parent 2eb3d37 commit 150f3df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export class MarkdownItAsync extends MarkdownIt {
5454
throw new Error(`Unknown highlight placeholder id: ${id}`)
5555
const [promise, _str, lang, _attrs] = this.map.get(id)!
5656
const result = await promise || ''
57+
this.map.delete(id)
5758
if (result.startsWith('<pre'))
5859
return result
5960
else

0 commit comments

Comments
 (0)