diff --git a/js/core/app-shell.js b/js/core/app-shell.js index eea98f6..8b6ee5e 100644 --- a/js/core/app-shell.js +++ b/js/core/app-shell.js @@ -1325,8 +1325,9 @@ }; } const svgCtx = streamState.svg; + // 兼容 ```svg、```xml、``` xml、``` svg 等格式 const startPattern = - manifest.artifact?.startPattern || /```(?:svg)?\s*'); if (closingIndex !== -1) { diff --git a/js/modules/product-canvas.js b/js/modules/product-canvas.js index f0ec6f3..7e690ff 100644 --- a/js/modules/product-canvas.js +++ b/js/modules/product-canvas.js @@ -22,7 +22,7 @@ artifact: { type: 'svg', fence: 'svg', - startPattern: /```(?:svg)?\s*