Skip to content

Commit ad023c3

Browse files
committed
Optimized
1 parent c3daf11 commit ad023c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/plugins/search/search.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,10 @@ export function search(query) {
170170
'...' +
171171
escapeHtml(postContent)
172172
.substring(start, end)
173-
.replace(regEx, function(word) {
174-
return `<em class="search-keyword">${word}</em>`;
175-
}) +
173+
.replace(
174+
regEx,
175+
word => `<em class="search-keyword">${word}</em>`
176+
) +
176177
'...';
177178

178179
resultStr += matchContent;

0 commit comments

Comments
 (0)