diff --git a/tool_core.js b/tool_core.js index 19aa4dc..3be82c9 100644 --- a/tool_core.js +++ b/tool_core.js @@ -348,8 +348,8 @@ module.exports = { return ( story .map(({ text = '' } = {}) => { - if (typeof text === 'string') return text.trim?.()?.replace?.(/\n/g, ' ') - else if (typeof text === 'object') return text[lang]?.trim?.()?.replace?.(/\n/g, ' ') + if (typeof text === 'string') return text.trim?.()?.replace?.(/\n+/g, ' ') + else if (typeof text === 'object') return text[lang]?.trim?.()?.replace?.(/\n+/g, ' ') }) ?.join(' ') ?.trim?.()