fix(client): prevent code duplication when using help button (#46232)

* fix(client): prevent code duplication when using help button

* feat(client): comment file name when opening issue in forum

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>

Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
pull/46231/merge
Niraj Nandish 2022-05-30 20:59:28 +04:00 committed by GitHub
parent ca3b75b5ac
commit d67a617e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -21,10 +21,10 @@ function filesToMarkdown(challengeFiles = {}) {
return fileString;
}
const fileName = moreThanOneFile
? `\\ file: ${challengeFile.contents}`
? `/* file: ${challengeFile.name}.${challengeFile.ext} */\n`
: '';
const fileType = challengeFile.ext;
return `${fileString}\`\`\`${fileType}\n${fileName}\n${challengeFile.contents}\n\`\`\`\n\n`;
return `${fileString}\`\`\`${fileType}\n${fileName}${challengeFile.contents}\n\`\`\`\n\n`;
}, '\n');
}