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

Fix issue #90: Add regex escape for format regex generation #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abhi-patel
Copy link

No description provided.

Copy link

@dima4p dima4p left a comment

Choose a reason for hiding this comment

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

good job

@clemens
Copy link
Owner

clemens commented Sep 15, 2017

Sorry, I missed this PR because you created it while I was on vacation. :)

@abhi-patel Please provide a test with it, then I'll merge it right away.

@abhi-patel
Copy link
Author

@dima4p @clemens - There is one issue with this solution, that is this will not work correctly with formats containing '%-m' or '%-d', as '-' is also regex special character and Regexp.escape will escape that as well.

I am thinking on best possible work around for this, meanwhile if you can think of some better way to fix that, let me know.

@dima4p
Copy link

dima4p commented Sep 15, 2017

gsub(/%\\-/, '%') as keys to not have values with "-"

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.

3 participants