Skip to content

Commit 2f581e8

Browse files
authored
Allow a space between # and region for folding in Python
Automatic formatting inserts a space between the comment marker `#` and text in the Python extension, so without the allowance for whitespace then `"editor.formatOnType": true` breaks all region markers. Closes microsoft/vscode-python#1073 and microsoft/vscode-python#33
1 parent a4da791 commit 2f581e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

extensions/python/language-configuration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
"folding": {
4444
"offSide": true,
4545
"markers": {
46-
"start": "^\\s*#region\\b",
47-
"end": "^\\s*#endregion\\b"
46+
"start": "^\\s*#\\s*region\\b",
47+
"end": "^\\s*#\\s*endregion\\b"
4848
}
4949
}
5050
}

0 commit comments

Comments
 (0)