Merge pull request #888 from edx/fix/ichuang/add-capital-greek-to-formulaequationinput

formulaequationinput: add capital greek letters and hbar to calc preview
This commit is contained in:
ichuang
2013-09-16 15:04:24 -07:00

View File

@@ -113,6 +113,12 @@ def enrich_varname(varname):
"vartheta iota kappa lambda mu nu xi pi rho sigma tau upsilon "
"phi varphi chi psi omega").split()
# add capital greek letters
greek += [x.capitalize() for x in greek]
# add hbar for QM
greek.append('hbar')
if varname in greek:
return ur"\{letter}".format(letter=varname)
else: