-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
The recognition of word boundaries when using style = "..." differs from that used in heck crate.
When HTTPClient is converted to snake case, it will appear as follows:
- parse_display:
httpcleint - heck:
http_client
This is due to the lack of implementation of rule 3 of the heck crate's word boundary definition in parse_display:
- All underscore characters are considered word boundaries.
- If an uppercase character is followed by lowercase letters, a word boundary is considered to be just prior to that uppercase character.
- If multiple uppercase characters are consecutive, they are considered to be within a single word, except that the last will be part of the next word if it is followed by lowercase characters (see rule 2).
I plan to adopt the same transformation as the heck crate in the future. Prior to this, I would like to release a version that will result in a compile error in the event of any incompatibility.
Steps
- Implement a feature that triggers a compile error when incompatibility arises.
- Release a version that triggers a compile error when incompatibility arises.
- Implement a transformation that is compatible with
heck. - Release a version that performs a transformation compatible with
heck.
Metadata
Metadata
Assignees
Labels
No labels