mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
fix(agents): normalize possessive federated handles
This commit is contained in:
1 parent
d3e58ca7fe
commit
2a19b5f57f
3 files changed
+14
-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
|
||||
ASCII/Unicode punctuation is ignored, but extra at-signs do not qualify for that exemption.
|
||||
ASCII/Unicode punctuation and possessive apostrophe-s suffixes are 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(/\p{P}+$/gu, '')
|
||||
token.replace(/\p{P}+$/gu, '').replace(/['’]s$/iu, '')
|
||||
)
|
||||
)
|
||||
continue;
|
||||
|
||||
@@ -1778,3 +1778,15 @@ for (const suffix of ['…', '。', '!', '—']) {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
for (const suffix of ["'s", '’s']) {
|
||||
test(`federated handle may be possessive: ${suffix}`, async (t) => {
|
||||
assert.deepEqual(
|
||||
await diagnostics(t, {
|
||||
'AGENTS.md':
|
||||
'Contact @alice@example.social' + suffix + ' administrator',
|
||||
}),
|
||||
[]
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user