Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Folding breaks with brace-containing multiline strings #1516

Closed
mrwonko opened this issue Feb 13, 2018 · 1 comment
Closed

Folding breaks with brace-containing multiline strings #1516

mrwonko opened this issue Feb 13, 2018 · 1 comment
Labels

Comments

@mrwonko
Copy link

mrwonko commented Feb 13, 2018

Strings containing unindented braces break folding, which assumes the containing block ends at the opening brace inside the string. Take for example this code:

func foldMe() {
	_ = `if the braces inside the string are indented,
	{
		that's not an issue
	}`
	_ = `but multiline strings like this
{
	break folding
}`
	// there's no way to fold this code away
}

Trying to hide the implementation of foldMe() only hides everything up to and including the line containing but multiline strings like this.

@ramya-rao-a
Copy link
Contributor

Code folding in VS Code is done based on indentation and spaces. It does not depend on any language or language syntax.

All contiguous lines that have the same number of spaces or tabs in the starting of the lines can be collapsed together

microsoft/vscode#3422 is tracking the work on making folding language aware

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants