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

BrighterScript template strings in single line if breaks indentations #31

Open
chrisdp opened this issue Apr 20, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@chrisdp
Copy link

chrisdp commented Apr 20, 2021

Here is an example of the code I had:

sub isScreenInStack(screenType as String)
	for each screen in SgNode.getAllChildren(m.screensNode)
		if lCase(screen.subType()) = `${lCase(screenType)}screen` then return true
	end for
	return false
end sub

And this is the resulting format after formatting:

sub isScreenInStack(screenType as String)
	for each screen in SgNode.getAllChildren(m.screensNode)
		if lCase(screen.subType()) = `${lCase(screenType)}screen` then return true
		end for
		return false
	end sub

If I change this to multi line like so then everything is fine again:

sub isScreenInStack(screenType as String)
	for each screen in SgNode.getAllChildren(m.screensNode)
		if lCase(screen.subType()) = `${lCase(screenType)}screen` then
			return true
		end if
	end for
	return false
end sub
@chrisdp chrisdp added the bug Something isn't working label Apr 20, 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

No branches or pull requests

1 participant