Skip to content

Fixed issue for navbar when having multi-line string literals #32672

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

Merged
merged 5 commits into from
Aug 23, 2019

Conversation

armanio123
Copy link
Contributor

Truncate the a multi-line string literal to only the first line. Fixes on editors when there's an string literal as a parameter.

Example:

function a(f1: () => void, a: string) { }

a(() => { }, `line1
line2
line3
line4`);

Visual Studio Error:
image

Fix:
image

@armanio123 armanio123 requested a review from amcasey August 2, 2019 01:05
Copy link
Member

@sheetalkamat sheetalkamat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the test please

@armanio123
Copy link
Contributor Author

Fixes #32650

@armanio123
Copy link
Contributor Author

Tests added.

Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable.

@@ -7,6 +7,10 @@
////}
////declare module "MultilineMadness" {}
////
////declare module "Multiline\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good. Just for future if you could number each Madness so result shows exactly which one is turned into which one would be great. Thank you.

That is would prefer this instead of current test

////declare module "Multiline\r\nMadness1" {
////}
////
////declare module "Multiline\
////Madness2" {
////}
////declare module "MultilineMadness3" {}
////
////declare module "Multiline\
////Madness4" {
////}
////

@armanio123 armanio123 merged commit 25f609b into microsoft:master Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants