Skip to content

Stop folding region delimiters#25325

Merged
uniqueiniquity merged 3 commits into
microsoft:masterfrom
uniqueiniquity:stopFoldingRegionDelimiters
Jun 29, 2018
Merged

Stop folding region delimiters#25325
uniqueiniquity merged 3 commits into
microsoft:masterfrom
uniqueiniquity:stopFoldingRegionDelimiters

Conversation

@uniqueiniquity
Copy link
Copy Markdown
Contributor

@uniqueiniquity uniqueiniquity commented Jun 29, 2018

Fixes #23270.
Fixes #24152.

Previously, consecutive region delimiters are grouped into a folding region of their own.
This change excludes region delimiters from such folding regions.

@uniqueiniquity uniqueiniquity requested review from a user and mhegazy June 29, 2018 18:37
}

function isRegionDelimiter(lineText: string) {
return lineText.match(/^\s*\/\/\s*#(end)?region(?:\s+(.*))?(?:\r)?$/);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put the regexp in a constant to avoid parsing it again on every invocation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@uniqueiniquity uniqueiniquity merged commit bf508cb into microsoft:master Jun 29, 2018
@uniqueiniquity uniqueiniquity deleted the stopFoldingRegionDelimiters branch June 29, 2018 19:40
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants