Skip to content

Commit 8ef5467

Browse files
authored
Merge pull request #13 from levy04/regex-url-accents-fix
Fix regex of `remove_url_accents` function in main.py
2 parents 6b54340 + 3f1bb3b commit 8ef5467

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def remove_url_accents(text : str) -> str:
4444
Cause the headings get the id without the accents
4545
'''
4646

47-
pattern = r'\[(.*)\]\((.*)\)'
47+
pattern = r'\[(.*)\]\((.*?)\)'
4848
return re.sub(pattern, lambda m: f'[{m.group(1)}]({unidecode(m.group(2))})', text)
4949

5050

0 commit comments

Comments
 (0)