Browse Source

Allow capital 'X' when string is not played

pull/79/head
Oliverpool 9 years ago
parent
commit
4b7f98a9a6
  1. 4
      patacrep/songs/chordpro/syntax.py

4
patacrep/songs/chordpro/syntax.py

@ -73,7 +73,7 @@ class ChordproParser(Parser):
else:
frets = []
for fret in groups['frets'].split():
if fret == "x":
if fret in "xX":
frets.append(None)
else:
frets.append(int(fret))
@ -112,7 +112,7 @@ class ChordproParser(Parser):
^
(?P<key>[^\ ]*)\ *
(base-fret\ *(?P<basefret>[2-9]))?\ *
frets\ *(?P<frets>((\d+|x)\ *)+)\ *
frets\ *(?P<frets>((\d+|x|X)\ *)+)\ *
(fingers\ *(?P<fingers>(([0-4-])\ *)*))?
$
""",

Loading…
Cancel
Save