We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e555273 commit 30ae07bCopy full SHA for 30ae07b
server/hooks/create-excerpt.js
@@ -19,7 +19,7 @@ module.exports = function (options = {}) { // eslint-disable-line no-unused-vars
19
.replace(/\<br\>|\<\/br\>|\<\/ br\>|\<br\>|\<br\\\>|\<p\>|\<\/p\>/ig, "\n")
20
.replace(/\<(strong|b|i|blockquote|pre|em|u|h[1-6]|a)>|\<\/(strong|b|i|blockquote|pre|em|u|h[1-6]|a)>/ig, '')
21
.replace(/\<p\>\<br\>\<\/p\>/ig, ' ')
22
- .replace(/(\ )[2,]/ig, ' ')
+ .replace(/(\ ){2,}/ig, ' ')
23
.trim();
24
hook.data[`${options.field}Excerpt`] = trunc(content, options.length, {
25
ignoreTags: ['img', 'script', 'iframe']
0 commit comments