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

removes whitespace before multiline comment on line-separated multi-argument function call #136

Closed
matthargett opened this issue May 1, 2021 · 1 comment · Fixed by #143
Labels
bug Something isn't working

Comments

@matthargett
Copy link

oddly, it turns -- [[ isEdited ]] into --[[ isEdited ]] (removing the space before the --).

            local editedAST = visit(ast, {
                OperationDefinition = {
                    enter = function(self, ...)
                        local node = ...
                        checkVisitorFnArgs(expect, ast, { ... })
                        selectionSet = node.selectionSet
                        return Object.assign({}, node, {
                            selectionSet = {
                                kind = "SelectionSet",
                                selections = {},
                            },
                            didEnter = true,
                        })
                    end,
                    leave = function(self, ...)
                        local node = ...
                        checkVisitorFnArgs(
                            expect,
                            ast,
                            { ... },
                            true --[[ isEdited ]]
                        )
                        return Object.assign({}, node, {
                            selectionSet = selectionSet,
                            didLeave = true,
                        })
                    end,
                },
            })

image

@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label May 1, 2021
@JohnnyMorganz
Copy link
Owner

Doesn't seem to just be for function argument calls
The following:

local test --[[foo]] = true

gets formatted as

local test--[[foo]] = true

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