From 87cbb04d9bcb578a19abe593992fdd06add1ccc9 Mon Sep 17 00:00:00 2001 From: Aaron Carlino Date: Wed, 12 Feb 2020 16:32:55 +1300 Subject: [PATCH] Fix api tag parsing --- src/utils/cleanApiTags.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/cleanApiTags.ts b/src/utils/cleanApiTags.ts index 4ba00b5..777e96c 100644 --- a/src/utils/cleanApiTags.ts +++ b/src/utils/cleanApiTags.ts @@ -2,10 +2,11 @@ * Completes the shorthand [api:Something] syntax to [api:Something](Something) * @param html */ -const cleanApiTags = (html: string): string => { - return html.replace( +const cleanApiTags = (html: string): string => { + return html + .replace( /\[api:(.*?)\]([^(])/g, - (_, query, next) => `${query}${next}` + (_, query, next) => `${query}${next}` ) };