Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions falsepositives_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ func TestFalsePositives(t *testing.T) {
"cantPrepare", // variable name
"dontPrepare", // variable name
"\\nto", // https://github.com/client9/misspell/issues/93
"\\xadn",
"\\udaed",
"\\Uaccademic",
"4f8b42c22dd3729b519ba6f68d2da7cc5b2d606d05daed5ad5128cc03e6c6358", // https://github.com/client9/misspell/issues/97
}
r := New()
Expand Down
2 changes: 1 addition & 1 deletion notwords.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
var (
reEmail = regexp.MustCompile(`[a-zA-Z0-9_.%+-]+@[a-zA-Z0-9-.]+\.[a-zA-Z]{2,6}[^a-zA-Z]`)
reHost = regexp.MustCompile(`[a-zA-Z0-9-.]+\.[a-zA-Z]+`)
reBackslash = regexp.MustCompile(`\\[a-z]`)
reBackslash = regexp.MustCompile(`\\[abfnrtv]`)
)

// RemovePath attempts to strip away embedded file system paths, e.g.
Expand Down
2 changes: 2 additions & 0 deletions notwords_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ func TestNotWords(t *testing.T) {
{"x infinitie.net y", "x y"},
{"(s.svc.GetObject(", "( ("},
{"\\nto", " to"},
{"\\xadn", "\\xadn"},
{"\\udead", "\\udead"},
}
for pos, tt := range cases {
got := RemoveNotWords(tt.word)
Expand Down