YourSearchPlugin: search string "note"

29 views
Skip to first unread message

Wolfgang

unread,
Nov 24, 2025, 7:38:41 AM11/24/25
to TiddlyWikiClassic
Hi Yakov,
it seams that YSP does not work correctly, if a search string starts with "not". Eg. searching for "note" brings results that more look to fit "not e"...
PS: I'm using YSP v2.3.1...
Many thanks,
Wolfgang

Wolfgang

unread,
Jan 14, 2026, 2:24:15 AMJan 14
to TiddlyWikiClassic
Hi Yakov,
just for info: I "fixed" the problem in YSP by adding the " " character after "not" in the following RegExp:
var reNot_Parenthesis = /\s*(\-|not )?(\s*\()?/gi;
Regards,
Wolfgang

Yakov

unread,
Jan 14, 2026, 3:34:59 AMJan 14
to TiddlyWikiClassic
Hi Wolfgang, thanks for digging the issue. At the time you've posted the first message, I've quickly checked that it is related to parsing the NOT bits, but had little time for real debugging and testing (should've delegated to AI, though). Your fix is very close to what I'd consider a general fix, it's just better to require a "word boundary" instead of space after "not":

var reNot_Parenthesis = /\s*(\-|not\b)?(\s*\()?/gi;

Interestingly enough, it's not necessary to add the boundary before "not", "knot" and "knot of" are found correctly already.

I've added the fix to the new version of the plugin, currently only in the source file (demo page doesn't have the plugin synced with the source yet).

среда, 14 января 2026 г. в 10:24:15 UTC+3, Wolfgang:

Wolfgang

unread,
Jan 14, 2026, 3:51:08 AMJan 14
to TiddlyWikiClassic
Hi Yakov,
good to hear from you and thanks,
Wolfgang

Wolfgang

unread,
Jan 14, 2026, 4:19:43 AMJan 14
to TiddlyWikiClassic
one more thing: Alt+'<' for "previous page" in search results does not work since an "accessKey" apparently needs to be accessed by Alt+Shift+... which is '>' in case of Alt+Shift+'<'...

Yakov

unread,
Jan 22, 2026, 11:10:32 AMJan 22
to TiddlyWikiClassic
You're right. In fact, it depends on browser and OS if that's Alt+, Shift+Alt+, Ctrl+Option+, or something else. I've updated the plugin, for now just mentioned that in docs, but also DRYed "Alt-" by introducing the accessKeysPrefix variable, so that in the future it can be calculated based on browser/OS (probably this should be done in the TW core, as this confusion occurs in other places, too). The calculation needs some care, though: although MDN docs list some of the pairs, those are not comprehensive, for instance Vivaldi uses Shift+Alt+, although Chrome uses Alt+, not sure about Opera, PaleMoon, WaterFox, and others.

среда, 14 января 2026 г. в 12:19:43 UTC+3, Wolfgang:
Reply all
Reply to author
Forward
0 new messages