Fix link parsing

This commit is contained in:
Robert Miles 2018-08-02 23:53:41 -04:00
parent db18cc0872
commit 4fc0316e85
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ def processTranscript(r,dir_style=1):
text = [re.sub("''.*''","",x) for x in text]
elif dir_style==2:
text = [re.sub("\([^)]*\)","",x).replace(" "," ") for x in text]
text = [re.sub(r"\[\[[^|]*\|(.*)\]\]",r"\g<1>",x).replace("[[","").replace("]]","") for x in text]
text = [re.sub(r"\[\[[^|]*\|([^\]]+)\]\]",r"\g<1>",x).replace("[[","").replace("]]","") for x in text]
return "\n".join(text)
def normalize(t):