From 7417140a3d91e51507e0654ba2e4b26ea8e0f229 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Fri, 25 Sep 2026 07:54:43 +0100 Subject: [PATCH] When checking comments for activity names and ref regexes, stop consuming the non-word characters each side of the match. This was causing multiple references next to each other in a list to skip every even numbered reference. --- data/spot.py | 16 ++++++++-------- templates/add-spot.html | 2 +- templates/alerts.html | 2 +- templates/bands.html | 4 ++-- templates/base.html | 10 +++++----- templates/conditions.html | 2 +- templates/map.html | 4 ++-- templates/spots.html | 4 ++-- templates/status.html | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/data/spot.py b/data/spot.py index c53da15..1c12b40 100644 --- a/data/spot.py +++ b/data/spot.py @@ -283,21 +283,21 @@ class Spot: activity = self.activity_refs[0].activity.upper() regex = get_ref_regex_for_activity(activity) if regex: - all_comment_ref_matches = re.finditer(r"(^|\W)(" + regex + r")($|\W)", self.comment, re.IGNORECASE) + all_comment_ref_matches = re.finditer(r"(? - + diff --git a/templates/alerts.html b/templates/alerts.html index 6a3c3b5..b4fbf11 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -85,7 +85,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index 73e32bb..617e2bf 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,8 +76,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 981ab99..6cbe0e2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -16,10 +16,10 @@ window.fetchEventSource = fetchEventSource; - - - - + + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index 03ded5e..fd1b3db 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index 95923a4..e677924 100644 --- a/templates/map.html +++ b/templates/map.html @@ -113,8 +113,8 @@ const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}"; - - + + diff --git a/templates/spots.html b/templates/spots.html index 1743994..db10f41 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -125,8 +125,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index c459f82..73eeae9 100644 --- a/templates/status.html +++ b/templates/status.html @@ -96,7 +96,7 @@ - +