forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not truncate whitespace for multi-line string (microsoft#23977)
Resolves: microsoft#23743 It seems that when people have a multi line string such surrounded by """ quotes, the white spacing inside the quote is very much intentional, and so if we detect that they are in such code-block, we would rather not normalize/truncate the white spaces for that specific code block.
- Loading branch information
1 parent
71794f5
commit 9e44466
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
src/test/python_files/terminalExec/sample2_normalized_selection.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
def add(x, y): | ||
"""Adds x to y""" | ||
""" | ||
Adds x | ||
to | ||
y | ||
""" | ||
# Some comment | ||
return x + y | ||
|
||
v = add(1, 7) | ||
print(v) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
def add(x, y): | ||
"""Adds x to y""" | ||
""" | ||
Adds x | ||
to | ||
y | ||
""" | ||
# Some comment | ||
|
||
return x + y | ||
|
||
v = add(1, 7) | ||
|