提交
This commit is contained in:
@@ -226,8 +226,7 @@ export default {
|
||||
|
||||
|
||||
str = this.transformHtmlString(processedContent, 'table',{ keepBr: true })
|
||||
console.log("🚀 ~ extractContentWithoutOuterSpan888888 ~ str:", str);
|
||||
|
||||
|
||||
|
||||
// 创建一个临时的 DOM 元素来解析 HTML
|
||||
const div = document.createElement('div');
|
||||
@@ -917,9 +916,9 @@ str = str.replace(regex, function (match, content, offset, fullString) {
|
||||
});
|
||||
// 2. 删除所有不需要的标签 (除 `strong`, `em`, `sub`, `sup`, `b`, `i` 外的所有标签)
|
||||
if (type == 'table') {
|
||||
inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue|wmath|img|myfigure|mytable|myh3))[^>]+>/g, ''); // 删除不需要的标签
|
||||
inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue|wmath|img|myfigure|mytable|myh3|autocite))[^>]+>/g, ''); // 删除不需要的标签
|
||||
} else {
|
||||
inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue|wmath|myfigure|mytable|myh3))[^>]+>/g, ''); // 删除不需要的标签
|
||||
inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue|wmath|myfigure|mytable|myh3|autocite))[^>]+>/g, ''); // 删除不需要的标签
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user