diff --git a/README.md b/README.md index cc1dd88c..230c3dd8 100644 --- a/README.md +++ b/README.md @@ -845,4 +845,7 @@ _Last refreshed for release tag `1.9.3` on 2026-06-24. Latest commit date: 2026- Star History Chart -#### Friendly Links: [Linux DO:学AI,上L站!](https://linux.do/) + +## Friendly Links + +[Linux DO:学AI,上L站!](https://linux.do/) diff --git a/src/tests/readmeFooterStructure.test.ts b/src/tests/readmeFooterStructure.test.ts new file mode 100644 index 00000000..8d7b68f8 --- /dev/null +++ b/src/tests/readmeFooterStructure.test.ts @@ -0,0 +1,15 @@ +import * as fs from 'fs'; +import * as path from 'path'; + +describe('README footer structure', () => { + test('keeps Friendly Links outside the Star History HTML block', () => { + const repoRoot = path.join(__dirname, '..', '..'); + const source = fs.readFileSync(path.join(repoRoot, 'README.md'), 'utf8'); + + expect(source).toMatch( + /<\/a>\r?\n\r?\n## Friendly Links\r?\n\r?\n\[Linux DO:学AI,上L站!\]\(https:\/\/linux\.do\/\)/ + ); + expect(source).not.toContain('#### Friendly Links'); + expect(source).not.toContain('codex-text-link://'); + }); +});