Also remove trailing garbage from hashtag text found in the rendered content.

todos-and-issues
Alain St-Denis 2024-02-13 17:56:18 -05:00
rodzic 21184c368a
commit 2672eede39
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -872,7 +872,7 @@ class Note(Object, RawContentMixin):
normalized_url = f'{parsed.scheme}://{parsed.netloc}{normalized_path.decode()}'
links = {link['href'].lower(), unquote(link['href']).lower(), url, normalized_url}
if links.intersection(hrefs):
tag = re.match(r'^#?([\w\-]+$)', link.text)
tag = re.match(r'^#?([\w\-]+)', link.text)
if tag:
link['data-hashtag'] = tag.group(1).lower()