mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Preserve <br> for empty paragraphs
This commit is contained in:
parent
9b69cd2aca
commit
e448c7a529
1 changed files with 1 additions and 2 deletions
|
|
@ -36,8 +36,7 @@
|
|||
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(/<p>\s*<\/p>/g, '<p> </p>');
|
||||
str = str.replace(/(<\/?)div(\W)/g, '$1p$2');
|
||||
return str;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue