Skip to content

Commit f0a06c9

Browse files
committed
Makes formatShortDescription faster
1 parent 3329351 commit f0a06c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

velog-backend/src/lib/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function formatShortDescription(markdown: string): string {
8080
.replace(/[<>]/g, '');
8181

8282
return (
83-
removeMd(replaced)
83+
removeMd(replaced.slice(0, 500))
8484
.slice(0, 200)
8585
.replace(/#/g, '') + (replaced.length > 200 ? '...' : '')
8686
);

0 commit comments

Comments
 (0)