Fix empty lines being removed after saving

This commit is contained in:
Kijin Sung 2020-07-08 16:20:19 +09:00
parent a2c763661c
commit 9b69cd2aca

View file

@ -36,7 +36,8 @@
str = String(str);
str = str.replace(/<!--(.*?)-->/g, '');
str = str.replace(/<\/?(\?xml|meta|link|font|style|script|noscript|frame|noframes)\b[^>]*?>/ig, '');
str = str.replace(/<br\s?\/?>/g, '').replace(/(<\/?)div(\W)/g, '$1p$2');
str = str.replace(/<br\s*\/?>/g, '').replace(/(<\/?)div(\W)/g, '$1p$2');
str = str.replace(/<p>\s*<\/p>/g, '<p>&nbsp;</p>');
return str;
};