react-ai-renderer 0.1.14 → 0.1.15
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.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58367,7 +58367,8 @@ function preprocessMdxContent(content) {
|
|
|
58367
58367
|
// 将其他自闭合 HTML 标签转换为 JSX 格式
|
|
58368
58368
|
.replace(/<(hr|img|input)([^>]*)(?<!\/)>/gi, '<$1$2 />');
|
|
58369
58369
|
// 转义非标准格式的内容
|
|
58370
|
-
|
|
58370
|
+
// 支持以下划线开头的组件名(如 _THINK)
|
|
58371
|
+
return processedContent.replace(/<(?!\/|[A-Z_][a-zA-Z0-9_]*\b|[a-z][a-zA-Z0-9]*\b)/g, '<');
|
|
58371
58372
|
}
|
|
58372
58373
|
// 辅助函数:格式化props
|
|
58373
58374
|
function formatProps(props) {
|