fix(tools): Use endsWith instead of regex (#40888)

This commit is contained in:
Randell Dawson
2021-02-03 01:00:56 -07:00
committed by GitHub
parent 7a0d885813
commit f5f2df187b

View File

@ -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')) {