Implement a dedicated function for word matching rather than relying on a regex and being at the mercy of the vagaries of regex implementations

This commit is contained in:
Kovid Goyal
2023-05-12 15:43:56 +05:30
parent 65f8bb7397
commit c101a6acb0
2 changed files with 69 additions and 11 deletions

View File

@@ -117,8 +117,7 @@ func TestHintMarking(t *testing.T) {
reset()
opts.Type = "word"
r(`#one (two) 😍 a-1b `, `#one`, `two`, `a-1b`)
// non-ascii words dont match because of https://github.com/dlclark/regexp2/issues/65
// r(`fōtiz час`, `fōtiz`, `час`)
r("fōtiz час a\u0310b ", `fōtiz`, `час`, "a\u0310b")
reset()
tdir := t.TempDir()