Skip to content

Commit 30ae07b

Browse files
fixed another two char bug
1 parent e555273 commit 30ae07b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/hooks/create-excerpt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = function (options = {}) { // eslint-disable-line no-unused-vars
1919
.replace(/\<br\>|\<\/br\>|\<\/ br\>|\<br\>|\<br\\\>|\<p\>|\<\/p\>/ig, "\n")
2020
.replace(/\<(strong|b|i|blockquote|pre|em|u|h[1-6]|a)>|\<\/(strong|b|i|blockquote|pre|em|u|h[1-6]|a)>/ig, '')
2121
.replace(/\<p\>\<br\>\<\/p\>/ig, ' ')
22-
.replace(/(\ )[2,]/ig, ' ')
22+
.replace(/(\ ){2,}/ig, ' ')
2323
.trim();
2424
hook.data[`${options.field}Excerpt`] = trunc(content, options.length, {
2525
ignoreTags: ['img', 'script', 'iframe']

0 commit comments

Comments
 (0)