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

Curley braces indented incorrectly when formatting spaces. #237

Open
Mark-FX opened this issue Jun 25, 2021 · 0 comments
Open

Curley braces indented incorrectly when formatting spaces. #237

Mark-FX opened this issue Jun 25, 2021 · 0 comments

Comments

@Mark-FX
Copy link

Mark-FX commented Jun 25, 2021

I am using the SwiftParser and all of it's associated classes from a Mac app Xcode project, and am initialising it and passing in the unformatted Swift String, and setting the "autoRemoveChar" and "Indent.paraAlign" from within the init function, for testing purposes.
I send an NSTextView.string to the init function, and assign the returned formatted string to the NSTextView.string, all appears to be working well until you send a string with too many and unnecessary spaces, from within a curley brace block or loop or conditional block.
I found this out by mistake when accidentally entering to many gaps between code words like this.

Code 1

The returned formatted code had closed the gaps as expected, but had indented the Curley braces further than they were already set, and continued to affect any further formatting on new typed or added code .

Code 2

At this stage I'm trying to work out if it has something to do with the NSTextView's string, or the formatting by the SwiftParser.

Any ideas or help as to what might be happening here would be appreciated ?
And how it could possibly be resolved ?

Kind Regards

Mark

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

No branches or pull requests

1 participant