mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-03 06:03:23 -05:00
fix(tools): Use endsWith instead of regex (#40888)
This commit is contained in:
@@ -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')) {
|
||||
|
||||
Reference in New Issue
Block a user