diff --git a/dist/converse.js b/dist/converse.js index c07b40932..b1076b5aa 100644 --- a/dist/converse.js +++ b/dist/converse.js @@ -86946,7 +86946,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ }; u.renderNewLines = function (text) { - return text.replace(/\n+/g, '
'); + return text.replace(/\n\n+/g, '

').replace(/\n/g, '
'); }; u.renderImageURLs = function (_converse, obj) { diff --git a/spec/messages.js b/spec/messages.js index 0d4b5cb9d..22c7c0d08 100644 --- a/spec/messages.js +++ b/spec/messages.js @@ -1091,7 +1091,7 @@ " Hey\n\n\nHave you heard the news?"+ "").firstChild; _converse.connection._dataRecv(test_utils.createRequest(stanza)); - expect(chat_content.querySelector('.message:last-child .chat-msg-text').innerHTML).toBe('Hey
Have you heard the news?'); + expect(chat_content.querySelector('.message:last-child .chat-msg-text').innerHTML).toBe('Hey

Have you heard the news?'); stanza = Strophe.xmlHtmlNode( "'); + return text.replace(/\n\n+/g, '

').replace(/\n/g, '
'); }; u.renderImageURLs = function (_converse, obj) {