Fossil SCM

Lower-case /chat #hashtags filters when they're set rather than on each comparison.

stephan 2026-08-24 16:58 UTC trunk
Commit b8c7665e121b25c3ccc268edbab86ec27c72f7a3c0cd56fa1ed2762a84fadc38
1 file changed +2 -2
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -194,11 +194,11 @@
194194
}
195195
},
196196
hashtag:{
197197
activeTag: undefined,
198198
match: function(tag){
199
- return !this.activeTag || tag?.toLowerCase?.()===this.activeTag.toLowerCase();
199
+ return !this.activeTag || tag?.toLowerCase?.()===this.activeTag;
200200
},
201201
matchElem: function(e){
202202
return !this.activeTag
203203
|| !!e.querySelector('[data-hashtag="'+this.activeTag+'"]');
204204
}
@@ -838,11 +838,11 @@
838838
setHashtagFilter: function(tag){
839839
if(!tag || (this.filter.current
840840
&& this.filter.current!==this.filter.hashtag)){
841841
this.clearFilters();
842842
}
843
- this.filter.hashtag.activeTag = tag;
843
+ this.filter.hashtag.activeTag = tag.toLowerCase();
844844
if(tag) this.applyMessageFilter(this.filter.hashtag);
845845
this.filter.current = tag ? this.filter.hashtag : undefined;
846846
return this;
847847
},
848848
849849
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -194,11 +194,11 @@
194 }
195 },
196 hashtag:{
197 activeTag: undefined,
198 match: function(tag){
199 return !this.activeTag || tag?.toLowerCase?.()===this.activeTag.toLowerCase();
200 },
201 matchElem: function(e){
202 return !this.activeTag
203 || !!e.querySelector('[data-hashtag="'+this.activeTag+'"]');
204 }
@@ -838,11 +838,11 @@
838 setHashtagFilter: function(tag){
839 if(!tag || (this.filter.current
840 && this.filter.current!==this.filter.hashtag)){
841 this.clearFilters();
842 }
843 this.filter.hashtag.activeTag = tag;
844 if(tag) this.applyMessageFilter(this.filter.hashtag);
845 this.filter.current = tag ? this.filter.hashtag : undefined;
846 return this;
847 },
848
849
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -194,11 +194,11 @@
194 }
195 },
196 hashtag:{
197 activeTag: undefined,
198 match: function(tag){
199 return !this.activeTag || tag?.toLowerCase?.()===this.activeTag;
200 },
201 matchElem: function(e){
202 return !this.activeTag
203 || !!e.querySelector('[data-hashtag="'+this.activeTag+'"]');
204 }
@@ -838,11 +838,11 @@
838 setHashtagFilter: function(tag){
839 if(!tag || (this.filter.current
840 && this.filter.current!==this.filter.hashtag)){
841 this.clearFilters();
842 }
843 this.filter.hashtag.activeTag = tag.toLowerCase();
844 if(tag) this.applyMessageFilter(this.filter.hashtag);
845 this.filter.current = tag ? this.filter.hashtag : undefined;
846 return this;
847 },
848
849

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button