Skip to content
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

Efficiency: Compile RegEx once #1230

Merged
merged 2 commits into from
Oct 11, 2016
Merged

Efficiency: Compile RegEx once #1230

merged 2 commits into from
Oct 11, 2016

Conversation

xErik
Copy link
Contributor

@xErik xErik commented Oct 10, 2016

Description

Efficiency: Create RegEx-object only once.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 94.733% when pulling f1d4a3a on xErik:master into 8a4d2f9 on yabwe:master.

Copy link
Contributor

@j0k3r j0k3r left a comment

Choose a reason for hiding this comment

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

Good idea

var matchOk = true,
matchEnd = match.index + match[0].length;
// If the regexp detected something as a link that has text immediately preceding/following it, bail out.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you revert that change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, just a sec.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 94.733% when pulling b979708 on xErik:master into 8a4d2f9 on yabwe:master.

@xErik
Copy link
Contributor Author

xErik commented Oct 10, 2016

Err, I am not a Github-Wizard. Is the comment there?

@j0k3r
Copy link
Contributor

j0k3r commented Oct 11, 2016

@xErik yep it's ok ! Thanks

@j0k3r j0k3r merged commit d2c21a7 into yabwe:master Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants