bhd-components 0.10.35 → 0.10.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.es5.development.js +4 -2
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +1 -1
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/customerService/function.js +1 -1
- package/es2017/customerService/index.js +3 -1
- package/esm/customerService/function.js +1 -1
- package/esm/customerService/index.js +3 -1
- package/package.json +1 -1
|
@@ -2937,7 +2937,7 @@ var removeMermaidBlockComments = function(markdownContent) {
|
|
|
2937
2937
|
var commentRegex = /(".*?"|'.*?')|(\/\*[\s\S]*?\*\/)|(\/\/.*?$)/gm;
|
|
2938
2938
|
var cleanContent = content.replace(commentRegex, function(m, stringPart) {
|
|
2939
2939
|
return stringPart || "";
|
|
2940
|
-
}).replace(/<br>/g, "");
|
|
2940
|
+
}).replace(/<br>/g, "").replace(/\\n/g, "");
|
|
2941
2941
|
// 拼接回完整代码块(保留 ```mermaid 和 ``` 标识)
|
|
2942
2942
|
return "".concat(prefix).concat(cleanContent).concat(suffix);
|
|
2943
2943
|
});
|
|
@@ -10584,7 +10584,9 @@ var CustomerService = function(props) {
|
|
|
10584
10584
|
// let code = message.split("```");
|
|
10585
10585
|
// code = code[1];
|
|
10586
10586
|
// console.log(code,888888888);
|
|
10587
|
-
|
|
10587
|
+
if (finishedRef.current || i != historyMessageList.length - 1) {
|
|
10588
|
+
message = removeMermaidBlockComments(message);
|
|
10589
|
+
}
|
|
10588
10590
|
message = handleRenderSyntaxBlock(message, finishedRef.current || i != historyMessageList.length - 1);
|
|
10589
10591
|
if (lastId == item.id && keyWordProblem != "") {
|
|
10590
10592
|
//点击历史记录时,找到关键字,防止关键字和标签名重复
|