fix loose links consuming spaces

This commit is contained in:
2025-08-16 00:55:25 +03:00
parent aec4724e2f
commit 348b782350

View File

@ -193,9 +193,10 @@ class Parser:
self.save_position()
# extract printable chars (extreme hack edition)
word = self.match_pattern(r'[ -~]')
word = self.match_pattern(r'[!-~]')
if not re.match(PAT_LINK, word):
match = re.match(PAT_LINK, word)
if not match:
self.restore_position()
return None