From 5dbb3bbf53ec9af788a27d6f7eb5cdcbb624291e Mon Sep 17 00:00:00 2001 From: Oleg Artene Date: Tue, 2 Apr 2019 19:16:38 +0300 Subject: [PATCH] comment-format: whitelist //region comments (#4609) --- src/rules/commentFormatRule.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rules/commentFormatRule.ts b/src/rules/commentFormatRule.ts index 5665678897e..47ade09cd9f 100644 --- a/src/rules/commentFormatRule.ts +++ b/src/rules/commentFormatRule.ts @@ -180,8 +180,8 @@ function walk(ctx: Lint.WalkContext) { return; } const commentText = fullText.slice(start, end); - // whitelist //#region and //#endregion and JetBrains IDEs' "//noinspection ..." - if (/^(?:#(?:end)?region|noinspection\s)/.test(commentText)) { + // whitelist //#region and //#endregion and JetBrains IDEs' "//noinspection ...", "//region", "//endregion" + if (/^(?:#?(?:end)?region|noinspection\s)/.test(commentText)) { return; }