Skip to content

Commit

Permalink
fix: prevent memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Jan 26, 2025
1 parent 7d04287 commit fb6f267
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugins/filter/after_render/external_link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ function externalLinkFilter(this: Hexo, data: string): string {
}
result += data.slice(lastIndex);

return result;
// prevent gc memory leak
return result.replace('#'.repeat(result.length + 1), '');
}

export = externalLinkFilter;

0 comments on commit fb6f267

Please sign in to comment.