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.
Currently, when
--preserve-caseis 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:
It would be awesome if it could be extended to do this:
Perhaps this could be opt-in.