jiebi/CodeConvo huggingface dataset:
Code change:
id: 'execute-challenge', label: 'Run tests', /* eslint-disable no-bitwise */ <del> keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter], </del> <ins> keybindings: [ monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter, monaco.KeyMod.WinCtrl | monaco.KeyCode.Enter ], </ins> run: () => { if (props.usesMultifileEditor && !isFinalProject(props.challengeType)) { if (challengeIsComplete()) {

Related discussion:
text: To be clear it should always work with regardless of the OS in addition to implicitly working with just like it was before.
I can't check this myself, since I don't have a mac, but it should work. This is the code: and could you try and reproduce the issue?
I've shot a short video of the behaviour I am seeing; if that helps.
That does help, yeah. It seems to be ignoring the command button entirely, which is odd. I can't investigate myself, but this will help anyone that has access to a Mac.
Thanks for the video I don't recall if ctrl+enter ever worked on mac - I may or may not have ever used it. I just hit buttons without looking I'm not sure if you are trying to show something specific with those code snippets - that's the code on main. Which results in the current behavior. Edit: I get it now - you were just showing the code and that it should be working. I thought you trying to show new changes or something. Here's the current behavior I see (all on mac) - there's some nuance... New RWD: Execute: only command+enter works on mac Submit: Enter alone works, so any key+enter works Legacy RWD, JS, etc: Execute: Only cmd+enter works Submit: Enter alone does not work - both ctrl+enter or command+enter do work Multiple choice Python video questions: Execute: Enter alone does not work - ctrl+enter and cmd+enter work Submit: Enter alone does not work - both ctrl+enter or command+enter do work Projects with URL inputs - e.g. front end libs cert project, or backend api challenges, etc: Execute: Enter alone works cause it's a form I suppose, which also means any key+enter works Submit: Enter alone does not work - both ctrl+enter or command+enter do work The last three groups there have the same submit modal, so the behavior is the same on all of them. What I see is that the submit modal, and the video question both allow [ctrl or cmd] +enter - we should see what those are doing. Looking into to it...
K, I think I found a fix. ctrl+enter works when the hotkeys package/component is used. So crtl+enter actually does work on the legacy challenges when the instructions are focused.
Code change:
id: 'execute-challenge', label: 'Run tests', /* eslint-disable no-bitwise */ <del> keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter], </del> <ins> keybindings: [ monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter, monaco.KeyMod.WinCtrl | monaco.KeyCode.Enter ], </ins> run: () => { if (props.usesMultifileEditor && !isFinalProject(props.challengeType)) { if (challengeIsComplete()) {

Related discussion:
text: When the editor is focused, those hotkeys don't get used, the actions/hotkeys we add to the editor take over. I made ctrl+enter work when the editor is focused by changing that line 431 mentioned to this: That should work. There's a number of actions in that file that use the same hotkeys - lines 457 and 469 for example. There may be others. I think we should be safe to change all those. Do you mind playing with that a bit and updating the PR to make those changes.
Nice work, Tom. I thought CtrlCmd was "Ctrl or Command", but it must be Ctrl on Windows and Command on Mac :man_facepalming: I guess this has never worked properly.
happy to give it a look and update the PR. Thank you
Here's an I had created sometime back when working on the . Apparently the logic goes like this - the first word is Windows and the second one is Mac button.
Code change:
testString: 'assert(checkObj({city: "Seattle"}, "city") === "Seattle");' - text: '<code>checkObj({city: "Seattle"}, "district")</code> should return <code>"Not Found"</code>.' testString: 'assert(checkObj({city: "Seattle"}, "district") === "Not Found");' <ins> - text: '<code>checkObj({pet: "kitten", bed: "sleigh"}, "gift")</code> should return <code>"Not Found"</code>.' testString: 'assert(checkObj({pet: "kitten", bed: "sleigh"}, "gift") === "Not Found");' </ins> ``` </section>

Related discussion:
text: <!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: The challenge "Testing Object for Properties" passes with wrong code: Add a Link to the page with the problem: users find the old solutions, paste that in the editor, and then add a new property to the object... My proposal is to add a few more tests - even obscured if needed, to avoid these kind of solutions passing
I created a PR to deal with this issue.
Code change:
```js // multiplies the first input value by the second and returns it const multiplier = (item, multi) => item * multi; <ins> multiplier(4, 2); // returns 8 </ins> ``` </section>

Related discussion:
text: <!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: The usage of the word "argument" ist unclear to me. The title of this challenge uses the word "parameter". Then the instructions state: "If an arrow function has a single argument, the parentheses enclosing the argument may be omitted." But the following snippet cited from the instructions shows the parameter "item" without parentheses: The functions are never invoked with an argument in the examples. As I understand it the sentence should say: "If an arrow function has a single parameter, the parentheses enclosing the parameter may be omitted." Add a Link to the page with the problem: or, Tell us about your browser and operating system: Browser Name: Browser Version: Operating System: If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):
Hello~! I agree that the verbiage is wrong here. should probably be replaced with in the examples and text, with the exception of the top line (which, at a quick glance, is the only correct use of ):
These are the ones that should be changed, I think. In fact, we could use instead.
I like that approach. Think this could be opened up to first timers?
I would go for: Just like a regular function, you can pass arguments into an arrow function. If an arrow function has a single parameter, the parentheses enclosing the parameter may be omitted. It is possible to pass more than one argument into an arrow function.
Sure, that works.
Code change:
void fastify.register(devLoginCallback, { prefix: '/auth' }); } void fastify.register(settingRoutes); <ins> void fastify.register(deprecatedEndpoints); </ins> return fastify; };

Related discussion:
text: Thanks for noticing this, Sem. As this route has been deprecated for a while, we should be able to safely sunset this route - NOT have it in the new API.
Reopening it as we're migrating deprecated endpoints as discussed in todays API meeting
Code change:
selectionHighlight: false, overviewRulerBorder: false, hideCursorInOverviewRuler: true, <del> renderIndentGuides: false, </del> <ins> renderIndentGuides: props.challengeType === challengeTypes.python, </ins> minimap: { enabled: false },

Related discussion:
text: When writing Python code in the editor, it would can be a bit frustrating for campers to keep track of the indentation specially if the instructions are a bit wordy. Also, the tests would fail in case indentation is incorrect. It would be a good feature to provide assistance within the browser editor to maintain indentation. A good example is how VSCode provides markers: ! No response
Code change:
editor.addAction({ id: 'save-editor-content', label: 'Save editor content', <del> keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S], </del> <ins> keybindings: [ monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S, monaco.KeyMod.WinCtrl | monaco.KeyCode.KEY_S ], </ins> run: props.challengeType === challengeTypes.multifileCertProject && props.isSignedIn

Related discussion:
text: Even though on macOS it would seem that Ctrl+Enter does not work & Cmd+Enter does; website still tells you to use Ctrl+Enter. I think this might end up being confusing for some - and should be fairly straightforward of a change. All coding pages You must use macOS for this issue. to any coding challenge your changes will see button underneath says "Check your code (Ctrl + Enter)" Ctrl + Enter will happen. Cmd + Enter behaviour will occur. It should tell the user correct shortcut (Cmd + Enter) instead of (Ctrl + Enter) depending on the platform. <img width="647" alt="Screenshot 2022-06-09 at 16 52 28" src="https://user-"- Device: M1 MacBook Pro OS: macOS 12.0.1 Browser: Safari Version: 15.1 No response
I would like to handle this issue as a first contribution. My proposal would be to use (). Use Ctrl + Enter as a fallback and define a special case for macOS cases. Alternatively we could use () however that is not widely supported as opposed to . As far as I can tell on mobile we don't show modifier keys on the button; so I'll preserve that behaviour. I can't change the labels on this issue - I don't think this is severe enough to be classified as a bug based on definition; my apologies regarding that.
Hey thanks for raising this issue and don't worry about the labels, they need to be handled by maintainers. What you've suggested does sound good to me, so if you're happy to take this on, that's awesome.
I've created the PR however; I've updated non English translations as well in here to use dynamic values; however not really sure how to align it with the crowdin. Since updated translations should coincide with this change; any opinions on this?
Do not worry, I think you are putting too much effort into it. Simply drop the changes to those files and as the bot mentioned, they will get updated eventually via our translation workflow. As for the bug itself: I am 100% sure at some point we introduced a regression, because (in addition to the implicit Cmd + Enter) was working since the inception of the code editor. do you happen to know if this was just an accident with the new editor?
Code change:
editor.addAction({ id: 'save-editor-content', label: 'Save editor content', <del> keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S], </del> <ins> keybindings: [ monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S, monaco.KeyMod.WinCtrl | monaco.KeyCode.KEY_S ], </ins> run: props.challengeType === challengeTypes.multifileCertProject && props.isSignedIn

Related discussion:
text: To be clear it should always work with regardless of the OS in addition to implicitly working with just like it was before.
I can't check this myself, since I don't have a mac, but it should work. This is the code: and could you try and reproduce the issue?
I've shot a short video of the behaviour I am seeing; if that helps.
That does help, yeah. It seems to be ignoring the command button entirely, which is odd. I can't investigate myself, but this will help anyone that has access to a Mac.
Thanks for the video I don't recall if ctrl+enter ever worked on mac - I may or may not have ever used it. I just hit buttons without looking I'm not sure if you are trying to show something specific with those code snippets - that's the code on main. Which results in the current behavior. Edit: I get it now - you were just showing the code and that it should be working. I thought you trying to show new changes or something. Here's the current behavior I see (all on mac) - there's some nuance... New RWD: Execute: only command+enter works on mac Submit: Enter alone works, so any key+enter works Legacy RWD, JS, etc: Execute: Only cmd+enter works Submit: Enter alone does not work - both ctrl+enter or command+enter do work Multiple choice Python video questions: Execute: Enter alone does not work - ctrl+enter and cmd+enter work Submit: Enter alone does not work - both ctrl+enter or command+enter do work Projects with URL inputs - e.g. front end libs cert project, or backend api challenges, etc: Execute: Enter alone works cause it's a form I suppose, which also means any key+enter works Submit: Enter alone does not work - both ctrl+enter or command+enter do work The last three groups there have the same submit modal, so the behavior is the same on all of them. What I see is that the submit modal, and the video question both allow [ctrl or cmd] +enter - we should see what those are doing. Looking into to it...
K, I think I found a fix. ctrl+enter works when the hotkeys package/component is used. So crtl+enter actually does work on the legacy challenges when the instructions are focused.
Code change:
editor.addAction({ id: 'save-editor-content', label: 'Save editor content', <del> keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S], </del> <ins> keybindings: [ monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S, monaco.KeyMod.WinCtrl | monaco.KeyCode.KEY_S ], </ins> run: props.challengeType === challengeTypes.multifileCertProject && props.isSignedIn

Related discussion:
text: When the editor is focused, those hotkeys don't get used, the actions/hotkeys we add to the editor take over. I made ctrl+enter work when the editor is focused by changing that line 431 mentioned to this: That should work. There's a number of actions in that file that use the same hotkeys - lines 457 and 469 for example. There may be others. I think we should be safe to change all those. Do you mind playing with that a bit and updating the PR to make those changes.
Nice work, Tom. I thought CtrlCmd was "Ctrl or Command", but it must be Ctrl on Windows and Command on Mac :man_facepalming: I guess this has never worked properly.
happy to give it a look and update the PR. Thank you
Here's an I had created sometime back when working on the . Apparently the logic goes like this - the first word is Windows and the second one is Mac button.
Code change:
## Instructions <section id='instructions'> <del> Combine the two if statements into one statement which will return <code>"Yes"</code> if <code>val</code> is less than or equal to <code>50</code> and greater than or equal to <code>25</code>. Otherwise, will return <code>"No"</code>. </del> <ins> Replace the two if statements with one statement, using the && operator, which will return <code>"Yes"</code> if <code>val</code> is less than or equal to <code>50</code> and greater than or equal to <code>25</code>. Otherwise, will return <code>"No"</code>. </ins> </section> ## Tests

Related discussion:
text: <!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: For this challenge, the starting code in my editor contains the following lines: The challenge is Since the idea behind this challenge is the ability to combine conditions with the && operator, I would expect the starting code to instead read: Add a Link to the page with the problem: Tell us about your browser and operating system: Browser Name: Chrome Browser Version: 76.0.3809.100 Operating System: MacOS Sierra If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):' <img width="1408" alt="Screen Shot 2019-11-10 at 5 36 23 PM" src="https://user-"
The instructions tell you what to do regardless of the seed code. If the seed code was provided as you describe, it would not be much of a challenge to solve.
I think the point of the exercise is to demonstrate the usage of the && operator, so even though it's easier with my suggestion, it's not trivial. If you'd rather not give that hint, though, there's no reason for the nested if statements in the seed code, and I was confused by them. The seed code should read:
The point of the exercise is two-fold. One is to teach the user how to use the operator. The other is to have the user figure how to achieve the same logic with the operator as without the operator using the nested if statements. I do not see any reason to change this challenge. I will let the other collaborators/mods give their opinions on this issue.
I'm with on this one - I don't think the seed needs changing. I redid the challenge and found that the nested if statements were helpful. You can create the intermediate solution: if you're more comfortable with nested if statements and that will pass all but the first two tests. This allows you to confirm that you've got the logic right before refactoring it into a single conditional. The only thing I would consider changing is to since 'combine' slightly implies that the new statement is built out of the original two, which isn't really the case here.
Code change:
## Instructions <section id='instructions'> <del> Combine the two if statements into one statement which will return <code>"Yes"</code> if <code>val</code> is less than or equal to <code>50</code> and greater than or equal to <code>25</code>. Otherwise, will return <code>"No"</code>. </del> <ins> Replace the two if statements with one statement, using the && operator, which will return <code>"Yes"</code> if <code>val</code> is less than or equal to <code>50</code> and greater than or equal to <code>25</code>. Otherwise, will return <code>"No"</code>. </ins> </section> ## Tests

Related discussion:
text: Doing that should make it less confusing without watering the task down.
Thanks I like your suggestion to change the wording to
Any interest in creating a PR for that
Thank you for the link
Code change:
(data) => { assert.match( data, <del> /passport.use.*new GitHubStrategy/gi, </del> <ins> /passport.use.*new GitHubStrategy/gis, </ins> 'Passport should use a new GitHubStrategy' ); assert.match(

Related discussion:
text: Affected page Your code The callback url is redacted. Expected behavior I expected this code to pass the tests. But it did not. System (please complete the following information): Device: [Laptop] OS: [Ubuntu 20.4] Browser: [Opera] Version: [77] Additional context The third test didn't pass. So, I ran FCC on my local computer and checked the tests on the page. The first regex test is as follows: The regex won't pass if is on a new line because matches all characters except for the new line. When I replaced with the tests passed. So I think we should change this test to the following: My reasoning is that the correctness of a solution should not depend on formatting. Especially when the formatting is not something very abnormal.
Hello there, Thank you, for taking the time to open this. In general, we need to find a better way of testing these challenges without using RegEx, as mentioned in As for this issue, a quick-fix could be as you mentioned, but, I might even just make the test to use the flag: An issue with the help wanted or first timers only label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors. If you would like to contribute, and have not read the contributors docs, please do so here: If you have any issues with contributing, be sure to join us on the , or on the
Hello, Can I do this? I understand that I just need to change to this , right? I just didn't get this part: "make the test to use the s flag".
Hey . Thank you, for your interest in contributing. The issue with the current test RegEx is the does not match new lines. In JavaScript RegEx, there is an which allows to match new lines. Hope this clarifies
Yes, thank you I've another question, the only way to try these regex tests is by passing the url with the code as if you were someone trying to do the challenge, or does freeCodeCamp makes specific tests for this? Like tests to try the challenge test or something like that.
Code change:
(data) => { assert.match( data, <del> /passport.use.*new GitHubStrategy/gi, </del> <ins> /passport.use.*new GitHubStrategy/gis, </ins> 'Passport should use a new GitHubStrategy' ); assert.match(

Related discussion:
text: Unfortunately, we currently have nothing to help test the backend content - you will need to have the project and code, and build freeCodeCamp locally with the changes to test. Do remember, this section of the curriculum links all the code needed to pass the current tests.
OK, I'll see if a can give it a try, then! Thank you :)
Hey so I tried it out and the test actually passed without needing to modify anything! I made a deploy in Heroku: https://aileen- Based on this for the challenge. I just modified some files in the repo to see that the first tests of the challenge pass (i.e. try the previous heroku url ) Then skipped some steps and go ahead to modify the part of code that alirezaghey said that wasn't passing the tests. I tried with both codes: the one provided by the and the one provided by alirezaghey and it worked just fine. The file with the code that is being tested is right , as you would see is the same code provided in this issue. Here's a screenshot of the results. <img width="858" alt="Screen Shot 2021-06-24 at 7 24 31 PM" src="https://user-"Supposing I didn't miss anything, I would say that maybe it was a different problem that causes the regex to fail. I'll see if I can try it on Opera browser. I have this config: Device: [Laptop] OS: [Mac OS 10.14.6] Browser: [Chrome] Version: [91]
Hi Are you sure you haven't a false positive produced by the ? Neither of the regexes can differentiate between commented and uncommented code.
You're totally right, I completely forgot about that, sorry. I deleted the commented code and now the test is not passing. Tomorrow will be trying the fix both of you suggested. Thank you for your response!
Code change:
In the last challenge, you told npm to only include a specific version of a package. That’s a useful way to freeze your dependencies if you need to make sure that different parts of your project stay compatible with each other. But in most use cases, you don’t want to miss bug fixes since they often include important security patches and (hopefully) don’t break things in doing so. <del> To allow an npm dependency to update to the latest PATCH version, you can prefix the dependency’s version with the tilde (`~`) character. Here's an example of how to allow updates to any 1.3.x version. </del> <ins> To allow an npm dependency to update to the latest PATCH version, you can prefix the dependency’s version with the tilde (`~`) character. Here's an example of how to allow updates to any `1.3.x` version. </ins> ```json "package": "~1.3.8"

Related discussion:
text: In RTL, these texts will be broken, because they are a mix of special character, numbers, which follow different direction in RTL than LTR. ~1.2.13 1.2.x 1.x.x To fix these, add code elements around the version number. File: change to there are multiple instances in these files All of them should be wrapped in code elements Speaking of weird interactions. Using special characters that relay on direction will break in RTL, because it will be reverted, in example. will be we can wrap in
I want to contribute towards this issue. Can you assign this issue to me.
The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors. If you would like to contribute, and have not read the contributors docs, please do so here: If you have any issues with contributing, be sure to join us on the , or on the