Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect terminator for multiline string literal using @' or @" #957

Closed
mike-the-automator opened this issue Jul 13, 2017 · 5 comments
Closed
Labels
Area-Extension Terminal Issue-Enhancement A feature request (enhancement).

Comments

@mike-the-automator
Copy link

System Details

  • Operating system name and version: Windows 10 Enterprise Build 14393.1358
  • VS Code version: 1.14.0
  • PowerShell extension version: 1.4.1
  • Output from $PSVersionTable: pasted below.
Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here

PS C:\Projects\SQLServerDBA\Inventory> code -v
1.14.0
b8cd5b9556d8b70ea560d35b903422363f6c5c40
PS C:\Projects\SQLServerDBA\Inventory> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      4      1      0


PS C:\Projects\SQLServerDBA\Inventory> code --list-extensions --show-versions
ms-mssql.mssql@1.0.0
ms-vscode.PowerShell@1.4.1
PS C:\Projects\SQLServerDBA\Inventory> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.1358
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1358
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
### Issue Description

I am experiencing a problem with terminating multi-line string literals.  In the editor, when you open a string literal using a single quote (') or double quote (") the terminator is for the literal is automatically generated.  When you open a multi-line string literal using @' or @" (single or double quote preceded by the at sign) the editor only generates a single quote or double quote character as a terminator which will not terminate a string multi-line string literal.

I don't have time to grab a trace at the moment, but I'm happy to supply one if it would help in assessing this issue.  It seems pretty straightforward, so I'm not sure one will be necessary.


@kapilmb kapilmb added Area-General Issue-Enhancement A feature request (enhancement). labels Jul 14, 2017
@ghost
Copy link

ghost commented Nov 2, 2017

Add some visual details:

Expected behavior

powershell terminal
This is the behavior in a normal PowerShell terminal.

Actual behavior

powershell integrated terminal
This is the behavior in a integrated PowerShell terminal.
Translated error: Missing terminating character in the string.

@rkeithhill
Copy link
Contributor

Syntax highlighting is handled by the https://github.com/powershell/editorsyntax project. Can you file this issue on that project?

@ghost
Copy link

ghost commented Nov 3, 2017

@rkeithhill Issue I have reported it's not about highlighting. Error is in the integrated terminal itself: I can't write here strings in this terminal beacause when I press the Enter key the terminal throw error Missing terminating character in the string

@rkeithhill
Copy link
Contributor

Gotcha.

@SydneyhSmith
Copy link
Collaborator

Closing as this is fixed in PSReadLine because of multiline input.
Closing as PSReadLine is now available in the PowerShell Preview extension, tracking that PSReadLine is not available in the main PowerShell Extension here #1793

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extension Terminal Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

5 participants