Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Fix regex #109

Merged
merged 1 commit into from
Jul 8, 2018
Merged

Fix regex #109

merged 1 commit into from
Jul 8, 2018

Conversation

mpmaan
Copy link
Contributor

@mpmaan mpmaan commented Jul 4, 2018

Description

Pre-Submission Checklist

  • Your pull request targets the dev branch.
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/challenge-tests)
  • All new and existing tests pass the command npm test.
  • Use npm run commit to generate a conventional commit message.
    Learn more here: https://conventionalcommits.org/#why-use-conventional-commits
  • The changes were done locally on your machine and NOT GitHub web interface.
    If they were done on the web interface you have ensured that you are creating conventional commit messages.

Checklist:

  • Tested changes locally.
  • Addressed currently open issue (replace XXXXX with an issue no in next line)

Closes #108

Copy link
Contributor

@johnkennedy9147 johnkennedy9147 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpmaan regex looks good to me.
But Travis build is failing, think it is due to commit message and type being empty @raisedadead could you advise @mpmaan how to fix, thanks

@mpmaan
Copy link
Contributor Author

mpmaan commented Jul 4, 2018

@johnkennedy9147 maybe the error from commitlint-travis command can be fixed by updating commit message but i don't know why npm run test command is throwing error.

@ValeraS
Copy link
Contributor

ValeraS commented Jul 5, 2018

@mpmaan It looks like you'll need to write ' without \

@johnkennedy9147
Copy link
Contributor

@mpmaan sorry totally missed there was another error.
I think @ValeraS is correct you do not need to escape the ' - the " is escaped so it is not misinterpreted as the end of the json field.

@mpmaan
Copy link
Contributor Author

mpmaan commented Jul 5, 2018

@johnkennedy9147 I still don't know why do we use \\s+ instead of \s+ or \" instead of " in the challenges. I hope that changing the commit history won't cause any problem.

@johnkennedy9147
Copy link
Contributor

This is javascript within a json text field, it gets processed from a block of text into a line of code - so anywhere a \ or " needs to remain it must be escaped, using a backslash, otherwise when the json is processed the \ will be treated as escaping the next character and the " would be treated as the end of the json field.

@mpmaan
Copy link
Contributor Author

mpmaan commented Jul 5, 2018

@johnkennedy9147 Thanks, that makes sense.

@scissorsneedfoodtoo scissorsneedfoodtoo merged commit f4d598f into freeCodeCamp:dev Jul 8, 2018
@scissorsneedfoodtoo
Copy link
Contributor

✨ ✨ ✨ Awesome! Congratulations on your first contribution to freeCodeCamp! ✨ ✨ ✨

Thank you for submitting a PR for this issue, @mpmaan. We're all really looking forward to your next contribution.

Also, thank you @ValeraS and @johnkennedy9147 for your support.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong regex for test : ES6 - Difference between import and require
4 participants