Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于在vitepress1.5version中,使用markdown文本中出现 style={{key:value}} 有双重括号的时候就会报错404 #4438

Closed
4 tasks done
geniusmanyxh opened this issue Dec 20, 2024 · 1 comment
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@geniusmanyxh
Copy link

Describe the bug

双重花括号在markdown文本中编译失败404,无法正确显示文本内容。

Reproduction

4、jsx的语法规则

  • 定义虚拟DOM时,不要写括号
  • 标签中混入JS表达式时要用{}
  • 样式的类名指定不要用class,要用className
  • 内联样式,要用style={{key:value}}的形式去写
  • 只有一个根标签
  • 标签必须闭合
  • 标签首字母小写,则该标签会转为html中同名元素,若html中无该标签对应的同名元素则报错
  • 若标签首字母大写,react就去渲染对应的组件,若组件没有定义,则报错

Expected behavior

我觉得这个在编译的时候做一下处理,要兼容md通用格式

System Info

index.md:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

Additional context

Snipaste_2024-12-21_01-08-57 Snipaste_2024-12-21_01-07-28

Validations

@geniusmanyxh geniusmanyxh added the bug: pending triage Maybe a bug, waiting for confirmation label Dec 20, 2024
@brc-dd
Copy link
Member

brc-dd commented Dec 20, 2024

#480

@brc-dd brc-dd closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants