Commit 37ec21d8 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Replace empty formula suggestions with string empty to avoid indexing errors. #732

parent b442a460
......@@ -132,8 +132,14 @@ def variants_formula(value):
return list(set(formulas))
_tokenizer_formula = get_tokenizer(r'[A-Z][a-z]?\d*')
# Tokenizes a formula by splitting it by formula fragments.
tokenizer_formula = get_tokenizer(r'[A-Z][a-z]?\d*')
def tokenizer_formula(value):
return [
item if item != '' else 'empty'
for item in _tokenizer_formula(value)]
class BandGap(MSection):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment