--preserve-case enhancement: also use underscore-less CamelCase translations
- Dominant language
- Python
- Stars
- 374
- Forks
- 39
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
Currently, when `--preserve-case` is used to translate a CamelCase replacements to additional lowercase and uppercase replacements, it inserts underscores in between the word segments. This is cool, but on some occasions it would be useful to additionally do the replacement without the added underscores.
For example, the current behaviour is like this:
```
$ repren --full --from CamelCase --to DromedaryCase --preserve-case .
Using 4 patterns:
'CAMEL_CASE' -> 'DROMEDARY_CASE'
'CamelCase' -> 'DromedaryCase'
'camelCase' -> 'dromedaryCase'
'camel_case' -> 'dromedary_case'
```
It would be awesome if it could be extended to do this:
```
$ repren --full --from CamelCase --to DromedaryCase --preserve-case .
Using 6 patterns:
'CAMEL_CASE' -> 'DROMEDARY_CASE'
'CAMELCASE' -> 'DROMEDARYCASE'
'CamelCase' -> 'DromedaryCase'
'camelCase' -> 'dromedaryCase'
'camel_case' -> 'dromedary_case'
'camelcase' -> 'dromedarycase'
```
Perhaps this could be opt-in.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.