Skip to content

[Bug Report] VS Code 预览中 Cherry 图表不渲染;Mermaid 可渲染但颜色异常 #1624

@kundeng

Description

@kundeng

Prerequisites

Version

latest

Reproduction Link

No response

Describe the Bug

我在 VS Code 预览里遇到两个渲染问题:

  1. Cherry 的图表表格语法(如 :line: 及其他 Cherry 图表类型)无法渲染
  2. Mermaid 可以渲染,但颜色明显不对

目前这只是现象层面的反馈/推测(未确认根因),但控制台日志里有两类信息可能相关:Webview 的 CSP 样式拦截,以及偶发的扩展运行时错误。

环境

  • VS Code 桌面版(macOS)
  • 扩展版本:cherrymarkdownpublisher.cherry-markdown 0.1.1

最小 Cherry 复现(我这边不渲染)

| :line:{"title": "Line Chart"} | H1 | H2 | H3 |
| ------ | ------ | ------ | ------ |
| Sample1 | 11 | 11 | 4 |
| Sample2 | 112 | 111 | 22 |

实际结果

  • Cherry 图表示例显示为原始表格/文本,未生成图表。
  • Mermaid 图可显示,但配色与预期不一致。

期望结果

  • Cherry 图表语法可正常渲染。
  • Mermaid 颜色与预期主题/默认样式一致。

日志片段

cherry-markdown.min.js:1 Applying inline style violates the following Content Security Policy directive
'style-src 'self' https://*.vscode-cdn.net' ... The action has been blocked.
console.ts:139 [Extension Host] rejected promise not handled within 1 second:
Error: Illegal argument: line must be non-negative
mainThreadExtensionService.ts:79
[cherryMarkdownPublisher.cherry-markdown] Illegal argument: line must be non-negative
.../.vscode/extensions/cherrymarkdownpublisher.cherry-markdown-0.1.1/dist/extension.js:2:26945

System Information

Contributing

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞bugSomething isn't working🚀enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions