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 with table indexing containing comments #304

Closed
DeadOfAutumn opened this issue Nov 14, 2021 · 0 comments · Fixed by #305
Closed

Bug with table indexing containing comments #304

DeadOfAutumn opened this issue Nov 14, 2021 · 0 comments · Fixed by #305
Labels
bug Something isn't working

Comments

@DeadOfAutumn
Copy link

If a multi-line expression contains a comment, StyLua will make it one line, causing the trailing code to be put behind the comment and break the code during formatting.

Example:
item:
formatted item: (incorrect result):

PS: "may want to test for multiline comment in the middle of an table index operator as well" (on advice of Matt Hargett#9815, Discord)

-Contact Grey#2614, Discord

@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Nov 15, 2021
@JohnnyMorganz JohnnyMorganz changed the title Support multiline expression containing comment(s) (formatting) Bug with table indexing containing comments Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants