From 2f581e89868ba7196c64317c0a7c021b272dc706 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Wed, 28 Mar 2018 15:34:56 -0700 Subject: [PATCH] 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 --- extensions/python/language-configuration.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/python/language-configuration.json b/extensions/python/language-configuration.json index c2c4aabc862d3..4717d09750bae 100644 --- a/extensions/python/language-configuration.json +++ b/extensions/python/language-configuration.json @@ -43,8 +43,8 @@ "folding": { "offSide": true, "markers": { - "start": "^\\s*#region\\b", - "end": "^\\s*#endregion\\b" + "start": "^\\s*#\\s*region\\b", + "end": "^\\s*#\\s*endregion\\b" } } }