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

Formatting broken if function statement is written over multiple lines #252

Closed
gustason opened this issue Oct 9, 2024 · 2 comments · Fixed by #263
Closed

Formatting broken if function statement is written over multiple lines #252

gustason opened this issue Oct 9, 2024 · 2 comments · Fixed by #263
Assignees
Labels
bug Something isn't working

Comments

@gustason
Copy link
Collaborator

gustason commented Oct 9, 2024

For example,

function GetDLC returns character
():
    define variable cValue as character no-undo.
end function.

gets formatted as

fu:
ction GetDLC returns character
    ():
    define variable cValue as character no-undo.
end function.
@gustason gustason added the bug Something isn't working label Oct 9, 2024
@gustason
Copy link
Collaborator Author

gustason commented Oct 30, 2024

This kind of erroneous formatting doesn't seem to occur when blockFormatting is disabled, therefore, the problem might be in that.

@gustason
Copy link
Collaborator Author

I found that the problem is in the colon code of the BlockFormatter, as it always assumes that the colon will be on the first line.

@gustason gustason self-assigned this Nov 12, 2024
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.

1 participant