Skip to content

How do I preserve casing (lower/upper case of letters?) #213

Discussion options

You must be logged in to vote

Heya @NullVoxPopuli! 👋
Sorry you ran into a spot of trouble.
The answer is largely the same as rehypejs/rehype#88 and https://github.com/orgs/remarkjs/discussions/922
rehype is an HTML parser and formatter/stringifier.
HTML is case insensitive, and as such it applies formatting rules which are case insensitive as well.

You are trying to process content, ember templates, which break HTML rules (and by extension rehype) in a number of ways.
If you want ember specific parsing, you'll want an ember specific parser and stringifier which produces a unist compatible AST https://github.com/syntax-tree/unist to gaurantee if follows all the ember rules.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
4 replies
@NullVoxPopuli
Comment options

@ChristianMurphy
Comment options

@NullVoxPopuli
Comment options

@ChristianMurphy
Comment options

Comment options

You must be logged in to vote
4 replies
@NullVoxPopuli
Comment options

@ChristianMurphy
Comment options

@NullVoxPopuli
Comment options

@wooorm
Comment options

Answer selected by NullVoxPopuli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants