diff --git a/server/modules/rendering/html-core/renderer.js b/server/modules/rendering/html-core/renderer.js index 697c0ff4..15ac8db5 100644 --- a/server/modules/rendering/html-core/renderer.js +++ b/server/modules/rendering/html-core/renderer.js @@ -234,11 +234,11 @@ module.exports = { }) // -------------------------------- - // Wrap root text nodes + // Wrap non-empty root text nodes // -------------------------------- $('body').contents().toArray().forEach(item => { - if (item && item.type === 'text' && item.parent.name === 'body') { + if (item && item.type === 'text' && item.parent.name === 'body' && item.data !== `\n` && item.data !== `\r`) { $(item).wrap('
') } })