Skip to content

Fix 81779 Preserve Case Hyphen and Underscore replacement issues #81781

Merged
roblourens merged 3 commits intomicrosoft:masterfrom
skprabhanjan:fix-81779
Oct 1, 2019
Merged

Fix 81779 Preserve Case Hyphen and Underscore replacement issues #81781
roblourens merged 3 commits intomicrosoft:masterfrom
skprabhanjan:fix-81779

Conversation

@skprabhanjan
Copy link
Contributor

@roblourens , This fixes #81779 .
I have changed the ordering of condition checking ( first we check for hyphen and underscore variables so that we don't return initially itself and miss replace foo_Bar to newfoo_newbar )

CC : @ArturoDent , This fixes the comment you had raised.

@@ -7,20 +7,19 @@ import * as strings from './strings';

export function buildReplaceStringWithCasePreserved(matches: string[] | null, pattern: string): string {
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why this function takes a string[] then only looks at the first element?

Copy link
Contributor Author

@skprabhanjan skprabhanjan Oct 1, 2019

Choose a reason for hiding this comment

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

The initial implementation was like this only , I guess it was some parameter passing issue ( Needed to send a string[] , We can fix it at the source and change the type here)
I am not sure about this , I can look it in detail and change it if required .
PS : I can raise one more issue to fix this parameter confusion.

@roblourens roblourens added this to the September 2019 milestone Oct 1, 2019
@roblourens roblourens merged commit 5bd8022 into microsoft:master Oct 1, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve Case Hyphen and Underscore replacement issues

2 participants