We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Add rule to remove interpolated strings. Simple strings can be converted to string expressions:
Examples:
return `...`
Converts into:
return "..."
More complex interpolated strings can be a chain of concatenation
return `...{true}`
return "..." .. tostring(true)
The text was updated successfully, but these errors were encountered:
I did some research and while it is not very documented, the closest translation of interpolated strings seem to be with %* in string.format call.
%*
string.format
It would probably be useful to support generating string.format using %s and tostring calls for Lua environments that don't have %*.
%s
tostring
So for an input like:
return `object = {object} ({description})`
It can generate code using %*:
return string.format("object = %* (%*)", object, description)
It can generate code using %s:
return string.format("object = %s (%s)", tostring(object), tostring(description))
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Add rule to remove interpolated strings. Simple strings can be converted to string expressions:
Examples:
Converts into:
More complex interpolated strings can be a chain of concatenation
Converts into:
The text was updated successfully, but these errors were encountered: