@ant-design/agentic-ui 2.27.3 → 2.27.5
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.
|
@@ -408,7 +408,7 @@ var composeEditors = function(editor, plugins) {
|
|
|
408
408
|
extra: toolBar.extra,
|
|
409
409
|
min: toolBar.min
|
|
410
410
|
})) : readonly ? null : null, /*#__PURE__*/ React.createElement("div", {
|
|
411
|
-
className: "".concat(baseClassName, "-container"),
|
|
411
|
+
className: classNames("".concat(baseClassName, "-container"), props.containerClassName, hashId),
|
|
412
412
|
style: _object_spread({
|
|
413
413
|
overflow: 'auto',
|
|
414
414
|
display: 'flex',
|
|
@@ -85,6 +85,10 @@ import { handleInlineMath, handleMath } from "./parse/parseMath";
|
|
|
85
85
|
import { handleImage } from "./parse/parseMedia";
|
|
86
86
|
import { parseTableOrChart, preprocessMarkdownTableNewlines } from "./parse/parseTable";
|
|
87
87
|
import mdastParser from "./remarkParse";
|
|
88
|
+
// 删除 <answer> 和 </answer> 标签,保留中间内容
|
|
89
|
+
var removeAnswerTags = function(text) {
|
|
90
|
+
return text.replace(/<answer>\s*/g, '').replace(/\s*<\/answer>/g, '');
|
|
91
|
+
};
|
|
88
92
|
/**
|
|
89
93
|
* Markdown 到 Slate 节点解析器类
|
|
90
94
|
*
|
|
@@ -110,8 +114,8 @@ import mdastParser from "./remarkParse";
|
|
|
110
114
|
*/ key: "parse",
|
|
111
115
|
value: function parse(md) {
|
|
112
116
|
// 先预处理 <think> 标签,然后预处理其他非标准 HTML 标签,最后处理表格换行
|
|
113
|
-
var thinkProcessed = preprocessThinkTags(md || '');
|
|
114
|
-
var nonStandardProcessed = preprocessNonStandardHtmlTags(thinkProcessed);
|
|
117
|
+
var thinkProcessed = removeAnswerTags(preprocessThinkTags(md || ''));
|
|
118
|
+
var nonStandardProcessed = removeAnswerTags(preprocessNonStandardHtmlTags(thinkProcessed));
|
|
115
119
|
// parse() 只执行 parser,需要 runSync() 来执行 transformer 插件
|
|
116
120
|
var ast = mdastParser.parse(preprocessMarkdownTableNewlines(nonStandardProcessed));
|
|
117
121
|
var processedMarkdown = mdastParser.runSync(ast);
|