def identify_text(index, element, parent): if isinstance(element, str): if not s.is_chord_line(element): parent.pop(index) parent.insert(index, s.Text(element))
def identify_chordlines(index, element, parent): if isinstance(element, str): if s.is_chord_line(element): parent.pop(index) parent.insert(index, s.Chordline(element))