Catalog: an address passes when an allowed one leads it and only punctuation follows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab42b6f05b
commit
6eef671f14
2 files changed
+8
-9
No files matched your search
@@ -65,6 +65,12 @@ test("addresses in prose may end a sentence or hold parentheses", () => {
|
||||
assert.equal(read(catalog({ app, files: { "README.md": readme } })).apps.length, 1);
|
||||
});
|
||||
|
||||
test("an address may end in punctuation of its own", () => {
|
||||
const app = { ...good, source: "https://github.com/ada/tally_", website: "https://tally.app/?" };
|
||||
const readme = "[Source](https://github.com/ada/tally_) and [site](https://tally.app/?).\n";
|
||||
assert.equal(read(catalog({ app, files: { "README.md": readme } })).apps.length, 1);
|
||||
});
|
||||
|
||||
test("the empty catalog reads", () => {
|
||||
const root = mkdtempSync(join(tmpdir(), "showcase-"));
|
||||
mkdirSync(join(root, "apps"));
|
||||
@@ -115,6 +121,7 @@ const bad = [
|
||||
["a picture outside the folder in a README", { files: { "README.md": "\n" } }, /lowercase .png file name/],
|
||||
["inline code in a README", { files: { "README.md": "Run `cargo install tally`.\n" } }, /codespan is not allowed/],
|
||||
["a character reference in a README", { files: { "README.md": "Go https://evil.io/ now\n" } }, /not as references/],
|
||||
["an address that runs on past the website", { files: { "README.md": "See https://github.com/ada/tally.evil.io now\n" } }, /addresses go only/],
|
||||
["an escaped address in a README", { files: { "README.md": "Go https\://evil.io/ now\n" } }, /addresses go only/],
|
||||
["a large README", { files: { "README.md": "a".repeat(10241) } }, /over 10240/],
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user