Skip to content

SmartSend removes empty lines with triple-quoted strings #23743

Closed as not planned

Description

Type: Bug

Behaviour

SmartSend on a triple-quoted string containing empty lines (i.e. two or more subsequent \n) removes empty lines on execution.

Steps to reproduce:

  1. Hit Shift-Enter on the following string:
"""Hello

World




How are you?"""

The result is:

'Hello\nWorld\nHow are you?'

The expected result is:

'Hello\n\nWorld\n\n\n\n\nHow are you?'

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2024-07-04 08:42:46.921 [info] Telemetry level is off
2024-07-04 08:42:46.921 [info] Experiments are disabled, only manually opted experiments are active.
2024-07-04 08:42:46.921 [info] Python interpreter path: ~/.pyenv/versions/3.12.4/envs/temp/bin/python
2024-07-04 08:42:47.743 [info] Starting Pylance language server.
2024-07-04 08:42:49.160 [info] > ~/.pyenv/versions/3.12.4/envs/temp/bin/python ~/.vscode/extensions/ms-python.python-2024.9.2024062703-darwin-arm64/python_files/normalizeSelection.py
2024-07-04 08:42:49.307 [info] Send text to terminal: /Users/clemens/.pyenv/versions/3.12.4/envs/temp/bin/python
2024-07-04 08:47:40.793 [info] > ~/.pyenv/versions/3.12.4/envs/temp/bin/python ~/.vscode/extensions/ms-python.python-2024.9.2024062703-darwin-arm64/python_files/normalizeSelection.py
2024-07-04 08:47:40.827 [info] Send text to terminal: """Hello
World
How are you?"""

Extension version: 2024.9.2024062703
VS Code version: Code 1.91.0 (ea1445cc7016315d0f5728f8e8b12a45dc0a7286, 2024-07-01T18:53:23.353Z)
OS version: Darwin arm64 23.5.0
Modes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

area-replinfo-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions