From f5f2df187bf11d64671dfe40f58084bc93eaea9e Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Wed, 3 Feb 2021 01:00:56 -0700 Subject: [PATCH] fix(tools): Use endsWith instead of regex (#40888) --- tools/crowdin/utils/strings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/crowdin/utils/strings.js b/tools/crowdin/utils/strings.js index 6fa8025d446..b29e0321a53 100644 --- a/tools/crowdin/utils/strings.js +++ b/tools/crowdin/utils/strings.js @@ -24,7 +24,7 @@ const isReservedHeading = (context, str) => { const isCode = str => /^\/pre\/code|\/code$/.test(str); -const isTitle = str => /^(tests\s*->\s*\d+\s*)?->\s*title/.test(str); +const isTitle = str => str.endsWith('title'); const shouldHide = (text, context, challengeTitle, crowdinFilePath) => { if (crowdinFilePath.endsWith('.yml')) {