mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 03:56:15 -08:00
fix(agents): normalize Unicode punctuation on handles
This commit is contained in:
1 parent
0fda973f09
commit
d3e58ca7fe
3 files changed
+13
-2
No files matched your search
@@ -92,7 +92,7 @@ CLAUDE, INSTRUCTIONS, README, CONTRIBUTING and SECURITY, case-insensitively) are
|
||||
paths do not receive package exemptions. TypeScript configuration is parsed as JSONC.
|
||||
Declared packages also permit safe subpaths; exact aliases stay exact.
|
||||
Federated handles in the @user@host form are prose, not imports; trailing closing
|
||||
punctuation is ignored, but extra at-signs do not qualify for that exemption.
|
||||
ASCII/Unicode punctuation is ignored, but extra at-signs do not qualify for that exemption.
|
||||
Exact declared packages remain exempt after version normalization.
|
||||
Declared package mentions may include a version (including semver comparators and wildcard ranges) or dist-tag qualifier.
|
||||
Qualifier handling includes unscoped names; terminal sentence punctuation is
|
||||
|
||||
@@ -228,7 +228,7 @@ export async function validateAgentGuidance({ rootDir }) {
|
||||
if (isPackageMention(token)) continue;
|
||||
if (
|
||||
/^[\w.-]+@(?:[a-z\d](?:[a-z\d-]*[a-z\d])?\.)+[a-z]{2,}$/iu.test(
|
||||
token.replace(/[.,;:!?\)\]\}"'”’]+$/gu, '')
|
||||
token.replace(/\p{P}+$/gu, '')
|
||||
)
|
||||
)
|
||||
continue;
|
||||
|
||||
@@ -1767,3 +1767,14 @@ test('multiple at-signs cannot disguise an adjacent document import', async (t)
|
||||
).some((message) => message.includes('additional or inline'))
|
||||
);
|
||||
});
|
||||
|
||||
for (const suffix of ['…', '。', '!', '—']) {
|
||||
test(`federated handle accepts Unicode sentence ending: ${suffix}`, async (t) => {
|
||||
assert.deepEqual(
|
||||
await diagnostics(t, {
|
||||
'AGENTS.md': 'Contact @alice@example.social' + suffix,
|
||||
}),
|
||||
[]
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user