Closed oluckyman closed 2 years ago
Safari does not support negative look behind.
(string).match(/[\p{L}-]+/ug) looks like a powerful solution (found at https://stackoverflow.com/questions/150033/regular-expression-to-match-non-ascii-characters).
(We don't want to only match words separated by spaces.)
Thanks for fixing this a whole, um, sixteen months ago, @oluckyman. Sorry for the ridiculous delay, but the fix is finally deployed to the site; you can see test cases for the new release here: https://observablehq.com/d/4303b3734fb950d8.
There's not really any good reason for the delay, we were just focused elsewhere. We're improved our internal processes for upgrading these libraries so more people can do it (like me!) and it shouldn't be so slow / such a bottleneck in the future. 😬 🙈 😅 🙏
Inputs.search
does not work with Cyrillic queries due to the problem with the word boundary assertion (\b
). It supports only latin symbols:This PR introduces negative lookbehind
(?<!\S)
instead of\b
to detect a word boundary.