From 348b78235002f9f269a45c4472b96e9d1fb0be03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Sat, 16 Aug 2025 00:55:25 +0300 Subject: [PATCH] fix loose links consuming spaces --- app/lib/babycode_parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/lib/babycode_parser.py b/app/lib/babycode_parser.py index 124f384..84a236a 100644 --- a/app/lib/babycode_parser.py +++ b/app/lib/babycode_parser.py @@ -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