diff --git a/GenerateIconFontCppHeaders.py b/GenerateIconFontCppHeaders.py index 7ee066d..4f121ec 100644 --- a/GenerateIconFontCppHeaders.py +++ b/GenerateIconFontCppHeaders.py @@ -131,6 +131,7 @@ import os import sys import logging +import re if sys.version_info[0] < 3: raise Exception( "Python 3 or a more recent version is required." ) @@ -643,7 +644,7 @@ def line_icon( cls, icon ): @classmethod def to_camelcase( cls, text ): - parts = text.split( '-' ) + parts = re.split('[-_]', text) # Split the text using either '-' or '_' as separators for i in range( len( parts ) ): p = parts[i] parts[ i ] = p[ 0 ].upper() + p[ 1: ].lower()