|
|
@@ -2403,11 +2403,17 @@ export default {
|
|
|
},
|
|
|
formatTextWithBrackets(text) {
|
|
|
if (!text) return '';
|
|
|
- return text.replace(/【(.*?)】/g, '<span style="color:#81b337; font-weight: 500;">【$1】</span>');
|
|
|
+ // 精确去除中间的分类标签,保留【能力标题】和具体分析内容
|
|
|
+ // 匹配模式:【能力标题】分类标签:具体内容
|
|
|
+ let cleanText = text.replace(/】[^【:]*:[^:]*:/, '】').replace(/】[^【:]*:/, '】');
|
|
|
+ return cleanText.replace(/【(.*?)】/g, '<span style="color:#81b337; font-weight: 500;">【$1】</span>');
|
|
|
},
|
|
|
formatTextWithBrackets2(text) {
|
|
|
if (!text) return '';
|
|
|
- return text.replace(/【(.*?)】/g, '<span style="color:#fb752f; font-weight: 500;">【$1】</span>');
|
|
|
+ // 精确去除中间的分类标签,保留【能力标题】和具体分析内容
|
|
|
+ // 匹配模式:【能力标题】分类标签:具体内容
|
|
|
+ let cleanText = text.replace(/】[^【:]*:[^:]*:/, '】').replace(/】[^【:]*:/, '】');
|
|
|
+ return cleanText.replace(/【(.*?)】/g, '<span style="color:#fb752f; font-weight: 500;">【$1】</span>');
|
|
|
},
|
|
|
// 添加处理答案文本的方法
|
|
|
getAnswerText(answer) {
|