From 8139ccffdb6450f4413eff4a9d880b6741c7dd01 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 29 Nov 2022 09:44:22 -0700 Subject: Fix hashtag extraction --- tests/activities/models/test_hashtag.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/activities') diff --git a/tests/activities/models/test_hashtag.py b/tests/activities/models/test_hashtag.py index 32742d6..91af45c 100644 --- a/tests/activities/models/test_hashtag.py +++ b/tests/activities/models/test_hashtag.py @@ -9,11 +9,13 @@ def test_hashtag_from_content(): "with", ] assert Hashtag.hashtags_from_content("#hashtag.") == ["hashtag"] - assert Hashtag.hashtags_from_content("More text\n#one # two ##three #hashtag;") == [ + assert Hashtag.hashtags_from_content("More text\n#one # two ##three #hashtag!") == [ "hashtag", "one", "three", ] + assert Hashtag.hashtags_from_content("my #html loves entities") == ["html"] + assert Hashtag.hashtags_from_content("#tag") == ["tag"] def test_linkify_hashtag(): -- cgit v1.2.3