diff --git a/plugin-sdk/src/cli/checks/readme.ts b/plugin-sdk/src/cli/checks/readme.ts index 6dcd39cba..abc94b3c1 100644 --- a/plugin-sdk/src/cli/checks/readme.ts +++ b/plugin-sdk/src/cli/checks/readme.ts @@ -29,11 +29,29 @@ export const PLACEHOLDER_PATTERNS = [ export const MIN_PROSE_CHARS = 400; +/** + * The heading body, with the trailing HTML comment authors use to hide anchors cut off. + * + * Cut with indexOf rather than a regex on purpose. The obvious spellings — the + * `(.+?)\s*(?:\n## Screenshots\n##\tPermissions \n## Setup ')).toEqual(['What it does', 'Screenshots', 'Permissions', 'Setup']); + }); + + it('does not stall on a heading padded with spaces', () => { + // The old `(.+?)\s*(?: