diff --git a/utils/rules.py b/utils/rules.py index 0a7f8847..991fd3ba 100755 --- a/utils/rules.py +++ b/utils/rules.py @@ -139,13 +139,13 @@ for filename in songfiles: elif (re.compile("selectlanguage{english}").search(data)): #print "english song" #ensure no spaces before symbols ? ! ; : ) - data = re.sub("(?P\S)(?P[!?;:\)])","\g\g", data) + data = re.sub("(?P\S)\s(?P[!?;:\)])","\g\g", data) #ensure no spaces after symbols ( data = re.sub("(?P[\(])\s(?P\S)","\g\g", data) elif (re.compile("selectlanguage{spanish}").search(data)): #print "spanish song" #ensure no spaces before symbols ? ! ; : ) - data = re.sub("(?P\S)(?P[!?;:\)])","\g\g", data) + data = re.sub("(?P\S)\s(?P[!?;:\)])","\g\g", data) #ensure no spaces after symbols ¿ ¡ ( data = re.sub("(?P[¿¡\(])\s(?P\S)","\g\g", data) elif (re.compile("selectlanguage{portuguese}").search(data)):