python-case-converter
python-case-converter copied to clipboard
Issue in convertions to macro case with numbers
For example, for macro_case("ElCurrentPhase2") I would expect "EL_CURRENT_PHASE_2" but I get "EL_CURRENT_PHASE2" instead.
This depends a little on the semantics. I don't think you can differentiate between, for example, Phase2 and Phase 2 both of which are valid.
An option could be added to explicitly treat numbers proceeding letters as separate tokens. Ideally we'd default to whatever is most common, I don't have a good way to know that so supporting the existing behavior as default seems like a sane path forward.