mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-12 03:49:08 +02:00
Use Unicode word boundaries with the stdlib regexp engine Go's regexp only treats ASCII characters as word characters for \b, while regexp2 uses Unicode ones, so switching the builtin path pattern to the stdlib engine changed which paths were marked next to non-ASCII text, for example config.yaml文件 marked config.yaml. Match against a proxy of the text in which every non-ASCII rune is replaced by a single ASCII byte that is a word character iff the rune is one, then map the offsets back.