From 1d526d3a098914e196f205e75a9e6a31893986da Mon Sep 17 00:00:00 2001 From: Ivan Holmes Date: Mon, 11 Nov 2019 21:22:41 +0000 Subject: [PATCH] strip whitespace off entered fingering notes --- chordsheet/parsers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]