diff --git a/utils/rules.py b/utils/rules.py index a339c92d..eccce79b 100755 --- a/utils/rules.py +++ b/utils/rules.py @@ -76,13 +76,13 @@ word_dic = { "/Mi": "/E", "/Fa": "/F", "/Sol": "/G", -"gtab{La": "gtab{A", -"gtab{Si": "gtab{B", -"gtab{Do": "gtab{C", -"gtab{Ré": "gtab{D", -"gtab{Mi": "gtab{E", -"gtab{Fa": "gtab{F", -"gtab{Sol": "gtab{G", +"tab{La": "tab{A", +"tab{Si": "tab{B", +"tab{Do": "tab{C", +"tab{Ré": "tab{D", +"tab{Mi": "tab{E", +"tab{Fa": "tab{F", +"tab{Sol": "tab{G", "\\[La": "\\[A", "\\[Si": "\\[B", "\\[Do": "\\[C", @@ -161,9 +161,9 @@ def language_rules(string): #ensure non-breaking spaces before symbols ? ! ; : string = re.sub("(?P\S)(?P[!?;:])","\g \g", string) #... except for gtabs macros with capos - string = re.sub("(?Pgtab.*)\s:","\g:", string) + string = re.sub("(?Ptab.?{.*)\s:","\g:", string) #and apply a second time for cases like \gtab{Gm}{10:X02210:} - string = re.sub("(?Pgtab.*)\s:","\g:", string) + string = re.sub("(?Ptab.?{.*)\s:","\g:", string) #ensure no spaces after symbols ( string = re.sub("(?P[\(])\s(?P\S)","\g\g", string) #convert inverted commas