描述bug
在7.0.2版本中,使用Markdown组件导入.MD文件时,在storybook中显示时无法渲染unicode字符。
https://storybook.js.org/docs/react/api/doc-block-markdown#markdown
注意:我没有使用github的markdown插件,通过根据需要使用方括号和x来解决这个问题。
重现问题
克隆7.0.2版本的沙盒,添加以下两个文件:
MyReadme.stories.mdx:
import { Meta, Markdown } from '@storybook/addon-docs';
import Readme from './MyReadme.md?raw';
<Meta title="Issue/MyReadme" />
<Markdown>{Readme}</Markdown>
MyReadme.md
This should show a unicode checkbox in a table:
| Checked? | Character |
| ------------| --------- |
| No | ☐ |
| Yes | ☑ |
This should show a unicode character outside of the table: ☑
This was working with the previous mdx 1 implementation, and I've confirmed that is the correct setup for unicode characters according to markdown docs, it also works in other viewers I have tried using.
系统信息
Environment Info:
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Binaries:
Node: 16.18.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.39)
其他上下文
- 无响应*
1条答案
按热度按时间t2a7ltrp1#
你好,@shilman。我可以尝试修复这个问题吗?