From a6690b75ea92350bfb2277b0d8761ba6c46f510e Mon Sep 17 00:00:00 2001 From: Viacheslav Turovskyi Date: Mon, 20 May 2024 23:34:44 +0300 Subject: [PATCH] fix: fix typos in `RegExp`s of JSON Pointers (#164) Co-authored-by: souvik --- README.md | 4 ++-- src/parser.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2cbb4c4..e33b02b 100644 --- a/README.md +++ b/README.md @@ -202,11 +202,11 @@ There are no internal references that MUST be `Reference Object`s. Regexes of internal references that MUST be `Reference Object`s: ``` -/#\/channels\/,*\/servers/ +/#\/channels\/.*\/servers/ /#\/operations\/.*\/channel/ /#\/operations\/.*\/messages/ /#\/operations\/.*\/reply\/channel/ -/#\/operations\/,*\/reply\/messages/ +/#\/operations\/.*\/reply\/messages/ /#\/components\/channels\/.*\/servers/ /#\/components\/operations\/.*\/channel/ /#\/components\/operations\/.*\/messages/ diff --git a/src/parser.ts b/src/parser.ts index 427c16c..fcfcabe 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -48,11 +48,11 @@ export async function parse( excludedPathMatcher: (path: string): any => { return ( // prettier-ignore - (/#\/channels\/,*\/servers/).test(path) || + (/#\/channels\/.*\/servers/).test(path) || (/#\/operations\/.*\/channel/).test(path) || (/#\/operations\/.*\/messages/).test(path) || (/#\/operations\/.*\/reply\/channel/).test(path) || - (/#\/operations\/,*\/reply\/messages/).test(path) || + (/#\/operations\/.*\/reply\/messages/).test(path) || (/#\/components\/channels\/.*\/servers/).test(path) || (/#\/components\/operations\/.*\/channel/).test(path) || (/#\/components\/operations\/.*\/messages/).test(path) ||