Permalink
Browse files

Merge pull request #3 from mikola/master

Avoid creating an invalid class name
  • Loading branch information...
2 parents c94b39b + 317118d commit 831aa6b99d9b4fb012ee644d8e80e0bc0eb6d6ed @rtyler rtyler committed Dec 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 cheetah/Template.py
View
@@ -644,7 +644,7 @@ def __str__(self): return self.respond()
if not isinstance(className, (types.NoneType, basestring)):
raise TypeError(errmsg % ('className', 'string or None'))
- className = re.sub(r'^_+','', className or moduleName)
+ className = re.sub(r'^_+([^0-9])',r'\1', className or moduleName)
if mainMethodName is Unspecified:
mainMethodName = klass._CHEETAH_defaultMainMethodNameForTemplates

0 comments on commit 831aa6b

Please sign in to comment.