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

Bug fix keyword encoding when there are multiple keywords with '&' #301

Merged
merged 1 commit into from
May 2, 2019

Conversation

ThiesDS
Copy link

@ThiesDS ThiesDS commented Apr 28, 2019

See issue, as it fixes #300.

@PMassicotte
Copy link
Owner

Can you just use lapply?

@ThiesDS
Copy link
Author

ThiesDS commented Apr 30, 2019

As the new line uses the outcome of the previous line (recursively), I don't think lapply is applicable. But if you want I can write it as for loop.

@PMassicotte
Copy link
Owner

This is weird, form the help file:

sub and gsub perform replacement of the first and all matches respectively.

@ThiesDS
Copy link
Author

ThiesDS commented Apr 30, 2019

Right. That is why I wrote "It turns out that this only converts '&' to '%26' in the last keyword used - still don't know why" in the issue. I think this has to do with the regexp and the perl = TRUE. If I use the gsub with perl = FALSE it throws and error saying that "(?:\\G(?!^)|\\[\\s*)[^][\\s]*\\K\\&(?!])(?=[^][]*])" is not a regexp. However, I'm really not an expert in regexp.

@PMassicotte PMassicotte merged commit d898efd into PMassicotte:master May 2, 2019
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.

Encoding issue when there are multiple keywords with '&'
2 participants