diff --git a/chordsheet/parsers.py b/chordsheet/parsers.py index 6cdc462..7d73c84 100644 --- a/chordsheet/parsers.py +++ b/chordsheet/parsers.py @@ -10,13 +10,13 @@ def parseFingering(fingering, instrument): if len(fingering) == numStrings: # if the fingering is entered in concise format e.g. xx4455 output = list(fingering) else: # if entered in long format e.g. x,x,10,10,11,11 - output = fingering.split(",") + output = fingering.split(",").strip() if len(output) == numStrings: return output else: raise Exception("Voicing <{}> is malformed.".format(fingering)) elif instrument == 'piano': - return [parseName(note).upper() for note in fingering.split(",")] + return [parseName(note).upper().strip() for note in fingering.split(",")] else: return [fingering]