Skip to content

Preserve tag name cases #25

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

Closed
4 tasks done
quadratz opened this issue Jul 11, 2024 · 3 comments
Closed
4 tasks done

Preserve tag name cases #25

quadratz opened this issue Jul 11, 2024 · 3 comments
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on

Comments

@quadratz
Copy link

quadratz commented Jul 11, 2024

Initial checklist

Problem

Add an option to preserve the case of HTML tags. This is similar to issue #18, but for HTML tags in general.

Currently, this

{
      "type": "raw",
      "value": "<TabGroup><Tab lang='js' title='JavaScript' /></TabGroup>",     
}

will yield

 {
      "type": "element",
      "tagName": "tabgroup",
      // ...
 }

Solution

TabGroup and Tab should be cased.
It should produce this output instead

 {
      "type": "element",
      "tagName": "TabGroup",
      // ...
 }
@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jul 11, 2024
@ChristianMurphy
Copy link
Member

Welcome @quadratz! 👋
HTML is case insensitive, there are no plans to add non-html features to the HTML parser.
It looks like you may be working with XML or JSX.
If you are working with XML consider using https://github.com/syntax-tree/xast-util-from-xml
If you are working with JSX+Markdown consider using https://mdxjs.com/

@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
@ChristianMurphy ChristianMurphy added the 🤷 no/invalid This cannot be acted upon label Jul 11, 2024

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Jul 11, 2024
@quadratz
Copy link
Author

I think https://mdxjs.com/ is more suitable for my case. Thank you for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants