fix(process): treat non-ASCII letters as port continuations
\w is ASCII-only even with the u flag, so "port: 8080.β" was treated as a sentence-ending port. Use Unicode letter and number classes for the port boundary checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
184ed970b9
commit
ad813e473b
@@ -106,6 +106,7 @@ it("normalizes ports that end a sentence but not decimal or host continuations",
|
||||
"Bound [::1]:3000.",
|
||||
"listen=9000.\n",
|
||||
"port: 80.5 localhost:8080.5 localhost:8080.example.test",
|
||||
"port: 8080.β localhost:8080.é port: 8080é",
|
||||
].join("\n");
|
||||
expect(normalizeProcessText(input, scenario({}), "/temporary", rootPid)).toBe(
|
||||
[
|
||||
@@ -114,6 +115,7 @@ it("normalizes ports that end a sentence but not decimal or host continuations",
|
||||
"Bound [::1]:<port>.",
|
||||
"listen=<port>.\n",
|
||||
"port: 80.5 localhost:8080.5 localhost:8080.example.test",
|
||||
"port: 8080.β localhost:8080.é port: 8080é",
|
||||
].join("\n"),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user