From 2c5b009baa3a624ba096454132f56e1883159025 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 23 Sep 2024 08:08:19 -0700 Subject: [PATCH] fix: refer to allowlist as allowlist (#123) --- src/__tests__/markdown-helpers.spec.ts | 4 ++-- src/markdown-helpers.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/__tests__/markdown-helpers.spec.ts b/src/__tests__/markdown-helpers.spec.ts index 051d13a..768c614 100644 --- a/src/__tests__/markdown-helpers.spec.ts +++ b/src/__tests__/markdown-helpers.spec.ts @@ -44,9 +44,9 @@ describe('markdown-helpers', () => { ]); }); - it('should throw an error if there is a tag not on the whitelist', () => { + it('should throw an error if there is a tag not on the allowlist', () => { expect(() => parseHeadingTags(' _Awesome_')).toThrowErrorMatchingInlineSnapshot( - `"heading tags must be from the whitelist: ["macOS","mas","Windows","Linux","Experimental","Deprecated","Readonly"]: expected [ 'macOS', 'mas', 'Windows', …(4) ] to include 'Awesome'"`, + `"heading tags must be from the allowlist: ["macOS","mas","Windows","Linux","Experimental","Deprecated","Readonly"]: expected [ 'macOS', 'mas', 'Windows', …(4) ] to include 'Awesome'"`, ); }); }); diff --git a/src/markdown-helpers.ts b/src/markdown-helpers.ts index 6c6bb1f..db05204 100644 --- a/src/markdown-helpers.ts +++ b/src/markdown-helpers.ts @@ -30,7 +30,7 @@ export const parseHeadingTags = (tags: string | null): DocumentationTag[] => { while ((match = matcher.exec(tags))) { expect(ALLOWED_TAGS).to.contain( match[1], - `heading tags must be from the whitelist: ${JSON.stringify(ALLOWED_TAGS)}`, + `heading tags must be from the allowlist: ${JSON.stringify(ALLOWED_TAGS)}`, ); parsedTags.push(match[1] as keyof typeof tagMap); }