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

bug: Tree组件小驼峰显示异常 #2170

Open
binyellow opened this issue Jul 15, 2024 · 3 comments
Open

bug: Tree组件小驼峰显示异常 #2170

binyellow opened this issue Jul 15, 2024 · 3 comments
Labels
bug Something isn't working PR Welcome

Comments

@binyellow
Copy link
Contributor

binyellow commented Jul 15, 2024

Version

2.4.5

OS Version

macOS 13.6

Node.js Version

18.17.0

Browser Version

版本 126.0.6478.127(正式版本) (arm64)

Link to minimal reproduction

none

Steps to reproduce

image
image

What is expected?

期望小驼峰能正常显示

What is actually happening?

dealOverflow =》deal-$uoverflow
getQuestionIndex =》get-$uquestion-$uindex

Any additional comments? (optional)

No response

@binyellow
Copy link
Contributor Author

看到好像是这里的问题
src/loaders/markdown/transformer/rehypeRaw.ts:51

// mark all camelCase props for all custom react component
// because the parse5 within hast-util-raw will lowercase all attr names
node.value = node.value.replace(COMPONENT_PROP_REGEX, (str) => {
  return str.replace(
    /[A-Z]/g,
    (s) => `${PROP_STUB_ATTR}${s.toLowerCase()}`,
  );
});

我暂时先在string外面包了一个标签来规避了

@PeachScript PeachScript added bug Something isn't working PR Welcome and removed unconfirmed labels Jul 16, 2024
Copy link

Hello @binyellow. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @binyellow,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

@zhangfisher
Copy link

推荐一个树组件litetree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR Welcome
Projects
None yet
Development

No branches or pull requests

3 participants