Skip to content

"HTML" name for ViewComponents and TagHelpers not generated correctly if class name contains extended letters #10844

Open
@ElJacoTaco

Description

@ElJacoTaco

Class names in C# allow extended letters like ÅÄÖ. When using pascal casing and a new word begins with an extended letter like TestÄa the generated markup is wrong.

Steps to reproduce:

  1. Create a ViewComponent with the class name TestÄh.
  2. Generated markup to use it should be <vc:test-äa>
  3. Generated markup is <vc:testäa>

The actual issue is with the regex here:

"(?<!^)((?<=[a-zA-Z0-9])[A-Z][a-z])|((?<=[a-z])[A-Z])",

Solution:
Change the regex so it supports extended letters just like class names do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions