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 windows release directory renaming, regex string escaping and indentation #70

Merged
merged 3 commits into from
Mar 28, 2020

Conversation

oAGoulart
Copy link
Contributor

1. Fixed bug caused by the use of % on replacement string when calling string.gsub (lua>=5.2). According to lua-users: (link)

string.gsub repl

string.gsub [6] now raises an error if the replacement string contains a '%' followed by a character other than the permitted '%' or digit.

In short, the replacement string does not require escaping of magic characters.

2. Function utils.lua.escape_string_regex recreated with single string.gsub call.

3. Converted a few lines of code with three spaces of indentation to two.

@MisterDA
Copy link
Owner

Ideally, I’d prefer to have one commit fixing the bug, and one commit fixing the indentation.
You can also squash the commit fixing the typo (but I can do that during the merge). Don’t hesitate to force-push.
Can you do that?

Repository owner deleted a comment from coveralls Mar 28, 2020
MisterDA and others added 3 commits March 28, 2020 17:29
Fixed bug caused by the use of `%` on replacement string when calling
`string.gsub` (lua >= 5.2). According to
[lua-users](http://lua-users.org/wiki/LuaFiveTwo):

> ### string.gsub repl
>
> string.gsub
> [[6](http://www.lua.org/manual/5.2/manual.html#pdf-string.gsub)] now
> raises an error if the replacement string contains a '%' followed by
> a character other than the permitted '%' or digit.

In short, the replacement string does not require escaping of *magic
characters*.
@MisterDA MisterDA merged commit cad47b8 into MisterDA:master Mar 28, 2020
@MisterDA
Copy link
Owner

Took the liberty of doing the work myself and force-pushing. Thanks for the patches!

@oAGoulart oAGoulart deleted the updates branch March 28, 2020 18:56
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.

2 participants