From 29a849f70a47faacf397f5743da9d7af50915179 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sun, 22 Sep 2024 19:25:33 -0700 Subject: [PATCH] fix: refer to allowlist as allowlist --- 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 899d769..8330ec5 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 c9cf18a..1362e60 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); }