Browse Source

add url + prevent rules.py from modifying the url

remotes/origin/split-songs
Romain Goffe 13 years ago
parent
commit
85e1e0dee5
  1. 2
      utils/rules.py

2
utils/rules.py

@ -168,6 +168,8 @@ def language_rules(string):
string = re.sub("(?P<last_char>\S)(?P<symbol>[!?;:])","\g<last_char> \g<symbol>", string) string = re.sub("(?P<last_char>\S)(?P<symbol>[!?;:])","\g<last_char> \g<symbol>", string)
#... except for gtabs macros with capos #... except for gtabs macros with capos
string = re.sub("(?P<gtab>tab.?{.*)\s:","\g<gtab>:", string) string = re.sub("(?P<gtab>tab.?{.*)\s:","\g<gtab>:", string)
#... and for urls
string = re.sub("http\s:","http:", string)
#and apply a second time for cases like \gtab{Gm}{10:X02210:} #and apply a second time for cases like \gtab{Gm}{10:X02210:}
string = re.sub("(?P<gtab>tab.?{.*)\s:","\g<gtab>:", string) string = re.sub("(?P<gtab>tab.?{.*)\s:","\g<gtab>:", string)
#ensure no spaces after symbols ( #ensure no spaces after symbols (

Loading…
Cancel
Save