summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cheetah/Template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cheetah/Template.py b/cheetah/Template.py
index 7a9d0a7..f66cabd 100644
--- a/cheetah/Template.py
+++ b/cheetah/Template.py
@@ -644,7 +644,7 @@ class Template(Servlet):
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