Prevent 'comment-your-javascript-code' from passing incorrectly due to multi-line comments which are not visible to users#12888
Prevent 'comment-your-javascript-code' from passing incorrectly due to multi-line comments which are not visible to users#12888raisedadead merged 1 commit intofreeCodeCamp:stagingfrom richiethomas:fix/multiline-comments
Conversation
…o multi-line comments which are not visible to users
|
@richiethomas The new RegEx looks good and I pulled this down and ran it locally and the tests pass now only when they're supposed to, however - and this problem seems to have existed prior to your changes as well - if someone were to not close the multi-line comment, i.e. The linter throws a warning so there's that. I'm not sure if we just have to accept this or if there is some way around it. What do you think @Greenheart? Otherwise LGTM! |
Greenheart
left a comment
There was a problem hiding this comment.
@richiethomas @petercollingridge Thanks for reporting and solving this issue! The challenge now works as expected when I test locally 😄
@no-stack-dub-sack Regarding the Something went wrong-message, I only see one alternative at the moment.
Before the commit of this PR, there was a test checking for any comment that was closed (which always passed since it probably found some /*fcc*/-comment). This kind of test (or one checking for an matching number of /* and */) could theoretically solve this, but I think campers will realize something is wrong when they see the yellow warning sign from the linter in the editor.
I'd say we merge this 😊
|
@no-stack-dub-sack @Greenheart The wrong error message displaying is a known issue for any syntax error, not just comments (#12733) |
Pre-Submission Checklist
stagingbranch of freeCodeCamp.fix/,feature/, ortranslate/(e.g.fix/signin-issue)npm test. Usegit commit --amendto amend any fixes.Type of Change
Checklist:
Description