Fix get_lang_class parsing (take 2)

This commit is contained in:
Daylen Yang 2016-05-16 16:40:31 -07:00
parent 88538b339e
commit 5405e7dd73

View File

@ -23,7 +23,7 @@ def set_lang_class(name, cls):
def get_lang_class(name):
lang = re.split('[^a-zA-Z0-9_]', name, 1)[0]
lang = re.split('[^a-zA-Z0-9]', name, 1)[0]
if lang not in LANGUAGES:
raise RuntimeError('Language not supported: %s' % lang)
return LANGUAGES[lang]