提交 bb754760 编写于 作者: B baiy 提交者: ninecents

optimize

上级 a6a9eceb
......@@ -5,7 +5,7 @@ const nodeFilter = (item) => {
if (item == null) {
return "";
}
const re = new RegExp("<\/?\\w+((\\s+\\w+(\\s*=\\s*(?:\".*?\"|'.*?'|[^'\">\\s]+))?)+\\s*|\\s*)\/?>", 'igm');
const re = new RegExp("</?\\w+((\\s+\\w+(\\s*=\\s*(?:\".*?\"|'.*?'|[^'\">\\s]+))?)+\\s*|\\s*)/?>", 'igm');
item = item.replace(/\r\n|\r|\n/gmi, ' ');
item = item.replace(/\n|<br>|<br\/>|<br \/>/gmi, '\n');
item = item.replace(re, '');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册