Skip to content

Commit 8f5b564

Browse files
authored
Merge pull request #2802 from codecrafters-io/andy/feat
Add support for {{language_name}} in instructions markdown
2 parents b6af0e0 + 22735ce commit 8f5b564

File tree

1 file changed

+3
-0
lines changed
  • app/components/course-page/course-stage-step/your-task-card

1 file changed

+3
-0
lines changed

app/components/course-page/course-stage-step/your-task-card/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export default class YourTaskCardComponent extends Component<Signature> {
3131
variables[`lang_is_${(language as LanguageModel).slug}`] = this.args.repository.language === language;
3232
});
3333

34+
// Set placeholder language_name to a concrete one (Python) since it's the least awkward among all other options
35+
variables['language_name'] = this.args.repository.language?.name || 'Python';
36+
3437
return Mustache.render(this.args.courseStage.descriptionMarkdownTemplate, variables);
3538
}
3639

0 commit comments

Comments
 (0)