style: Make to_camel_case support numbers too.

This is needed to convert preserve-3d into Preserve3d.
This commit is contained in:
Emilio Cobos Álvarez 2017-12-05 19:14:50 +01:00
parent 1aadbd463a
commit 37cd870a9e
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -38,7 +38,7 @@ def to_rust_ident(name):
def to_camel_case(ident):
return re.sub("(^|_|-)([a-z])", lambda m: m.group(2).upper(), ident.strip("_").strip("-"))
return re.sub("(^|_|-)([a-z0-9])", lambda m: m.group(2).upper(), ident.strip("_").strip("-"))
def to_camel_case_lower(ident):