This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
should allow some numbers in subject #18
Comments
@BerkeleyTrue these lines of code prevent numbers to be injected in the title. We might be able to come up with a more elegant solution, but here's a quick solution just off the top of my head. The main repository issue numbers are now in the thousands. So we could change the regex to reject mentions of numbers with 4 or more digits. const noIssueNumbers = /#?\d{4,}/g; |
Keep in mind that we are not building this module specifically for fcc but for anyone to use (I use it on many of my projects). We want it to only identify numbers that are isolated (surrounded by whitespace) or starting with the issue number hash. The current regex doesn't seem to work. It has a false positive with |
@BerkeleyTrue ah that makes sense 👍 This might work then. const noIssueNumbers = /\s#?\d+\s?/g; I'll submit a PR for this. |
erictleung
added a commit
to erictleung/cz-freecodecamp
that referenced
this issue
Aug 29, 2017
The previous regex flagged a false positive with "es6" being in a title. This commit makes the specification more specific in that numbers standing alone with or without an hash symbol (#) cannot be used when flanked by white space. Closes freeCodeCamp#18
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
https://github.com/freeCodeCamp/cz-freecodecamp/blob/master/index.js#L1
This currently in is catching all numbers. For example:
add es6 globals
is rejectedcc @erictleung @raisedadead
The text was updated successfully, but these errors were encountered: