Composer: Fix double new lines in Safari (#1333)

This commit is contained in:
Alexander Zinchuk 2021-07-28 17:09:44 +03:00
parent 313c3ea5d8
commit d2a790fb06

View File

@ -67,6 +67,8 @@ function parseMarkdown(html: string) {
// Strip redundant nbsp's
parsedHtml = parsedHtml.replace(/ /g, ' ');
// Replace <div><br></div> with newline (new line in Safari)
parsedHtml = parsedHtml.replace(/<div><br([^>]*)?><\/div>/g, '\n');
// Replace <br> with newline
parsedHtml = parsedHtml.replace(/<br([^>]*)?>/g, '\n');