-
Notifications
You must be signed in to change notification settings - Fork 13
This pull request adds support for several RegEx character classes #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9 +/- ##
==========================================
- Coverage 96.7% 93.61% -3.09%
==========================================
Files 19 19
Lines 485 501 +16
Branches 71 71
==========================================
Hits 469 469
- Misses 16 32 +16
Continue to review full report at Codecov.
|
Hi @corsonknowles, thanks again for this contribution. It looks good to me. @teabyii, what's your opinion here? Are you missing something, or can we merge those changes? |
…t, add tests for new characters and improved helper methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove package-lock.json
?
package.json
Outdated
@@ -33,5 +33,8 @@ | |||
"istanbul": "^0.4.5", | |||
"mocha": "^3.0.2", | |||
"mocha-lcov-reporter": "^1.2.0" | |||
}, | |||
"dependencies": { | |||
"test": "^0.6.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it needs this dependency.
Thank you for the PR, and try to increase the code coverage? |
Why remove submodule and add |
Ah. I think I misunderstood the requests to add tests and increase coverage
and also the comment about removing the dependency. What is the correct
approach? Karim also asked me to write rules for the new RegEx characters
supported, and I followed the readme docs for the .rule files
I would be very happy to finish this today. Ideally, we will be giving a
demonstration with SRL-JavaScript tomorrow, and it would be very nice to
get to demonstrate it with these few minor updates in place.
…On Sat, Aug 12, 2017 at 8:13 AM Boom Lee ***@***.***> wrote:
Why remove submodule and add Test-Rules code directly to this repo? I
don't think it's a good way to maintenance the common text rules for
different languages.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABpRy1EifYXna5y1rdDgOfkM2MMPeeJqks5sXcElgaJpZM4Oygj5>
.
|
Ah, I see. I have moved the .rules files to a new Pull Request for the
relevant submodule in the rules repo.
I removed the local copy of the .rules files, and the changes to the
submodule for SRL-JavaScript.
Thanks!
On Sat, Aug 12, 2017 at 10:17 AM, David Corson-Knowles <
david.corsonknowles@gmail.com> wrote:
… Ah. I think I misunderstood the requests to add tests and increase
coverage and also the comment about removing the dependency. What is the
correct approach? Karim also asked me to write rules for the new RegEx
characters supported, and I followed the readme docs for the .rule files
I would be very happy to finish this today. Ideally, we will be giving a
demonstration with SRL-JavaScript tomorrow, and it would be very nice to
get to demonstrate it with these few minor updates in place.
On Sat, Aug 12, 2017 at 8:13 AM Boom Lee ***@***.***> wrote:
> Why remove submodule and add Test-Rules code directly to this repo? I
> don't think it's a good way to maintenance the common text rules for
> different languages.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#9 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABpRy1EifYXna5y1rdDgOfkM2MMPeeJqks5sXcElgaJpZM4Oygj5>
> .
>
|
…my comments from methodMatch
lib/Builder.js
Outdated
'tab': { | ||
'add': '\\t', | ||
'type': METHOD_TYPE_CHARACTER, | ||
'allowed': METHOD_TYPES_ALLOWED_FOR_CHARACTERS | ||
}, | ||
'vertical tab': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please stick with the camelCase convention there.
Thanks! Corrected.
On Sun, Aug 13, 2017 at 6:17 AM, David Corson-Knowles / CloudFunded <
david@cloudfunded.com> wrote:
… Thanks! Corrected.
On Sun, Aug 13, 2017 at 6:03 AM, Karim Geiger ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In lib/Builder.js
> <#9 (comment)>
> :
>
> > 'tab': {
> 'add': '\\t',
> 'type': METHOD_TYPE_CHARACTER,
> 'allowed': METHOD_TYPES_ALLOWED_FOR_CHARACTERS
> },
> + 'vertical tab': {
>
> Please stick with the camelCase convention there.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#9 (review)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABpRy8u5wQPh9O3uPUMqp-KrkQoFz9w-ks5sXvQrgaJpZM4Oygj5>
> .
>
|
Well done. Now Wait for PR for Test-rules to be merged. |
Thank you! Rules just merged.
…On Sun, Aug 13, 2017 at 11:20 PM Boom Lee ***@***.***> wrote:
Well done. Now Wait for PR for Test-rules
<SimpleRegex/Test-Rules#2> to be merged.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABpRy_pGxMkuf93fzLIDUrPyrlnAGIEhks5sX-cogaJpZM4Oygj5>
.
|
@corsonknowles Reorganize the commits and put them in one commit please? That looks more beautiful, thank you. |
@teabyii you can do this using GitHub while merging. Just select "Squash and merge" to combine them. |
Ok, I got it. |
Newly included character classes:
// "\d" any non-digit character
// \b word boundary
// \B not-word boundary
// carriage return \r
The above comments can be removed from methodMatch.js, and are only included to make code review easier.
Newly added:
support for negation of a group: none of abc -> [^abc]
Removed these RegEx characters that are not supported in JavaScript
// \A start of string, contrast with ^ which breaks at new lines
// \z end of string, contrast with $ which breaks at new lines