File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ def generate_mol_svg(self):
189189 def _find_text (self , text , start , indices ):
190190 index = self .label .find (text , start )
191191 if index in indices :
192- return self ._find_text (text , index + len ( text ) , indices )
192+ return self ._find_text (text , index + 1 , indices )
193193 return index
194194
195195 def _get_span_element (self , text , color ):
@@ -218,7 +218,7 @@ def generate_label(self):
218218 # create substitution string
219219 sub = self ._get_span_element (text , highlight .color )
220220 substitutions .append (Substitution (sub , start , end ))
221- starts .append ( start )
221+ starts .extend ( range ( start , end ) )
222222 # sort substitutions by order of appearance in label
223223 substitutions .sort (key = lambda x : x .start )
224224 n = 0
You can’t perform that action at this time.
0 commit comments