From 8371d208b183d5d575ad9f06cea13748607c67d9 Mon Sep 17 00:00:00 2001 From: ShareVB Date: Sun, 15 Dec 2024 20:59:48 +0100 Subject: [PATCH] fix: sonar --- .../markdown-toc-generator/markdown-toc-generator.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/markdown-toc-generator/markdown-toc-generator.service.ts b/src/tools/markdown-toc-generator/markdown-toc-generator.service.ts index ffc4a83e..ccfae77f 100644 --- a/src/tools/markdown-toc-generator/markdown-toc-generator.service.ts +++ b/src/tools/markdown-toc-generator/markdown-toc-generator.service.ts @@ -22,7 +22,7 @@ function stripHtmlTags(text: string) { } function stripMarkdownLinks(text: string, replacement: string = '$1') { - return text.replace(/\[([^\]]*)\]\([^\)]*\)/g, replacement); + return text.replace(/\[([^\]]*)\]\([^\)]*\)/g, replacement); // NOSONAR }; function concatDashes(text: string) { @@ -81,7 +81,7 @@ function getTitles(markdown: string, idGenerator: (titleMarkdownContent: string) return ''; }); - [...markdown.matchAll(/^(#+)(.*$)/mg)].forEach( + [...markdown.matchAll(/^(#+)(.*$)/mg)].forEach( // NOSONAR ([match, levelString, titleContent]) => { const level = levelString.length;