Skip to content

Fix-81729 Preserve case in Search and Replace isn't working when I use group substitution#81858

Merged
roblourens merged 2 commits intomicrosoft:masterfrom
skprabhanjan:fix-81729
Oct 26, 2019
Merged

Fix-81729 Preserve case in Search and Replace isn't working when I use group substitution#81858
roblourens merged 2 commits intomicrosoft:masterfrom
skprabhanjan:fix-81729

Conversation

@skprabhanjan
Copy link
Contributor

@skprabhanjan skprabhanjan commented Oct 2, 2019

@roblourens , This was not touched upon when preserve case was implemented , I have changed it to make it work for group substitution also . The gist of the change is that instead of returning text.replace(this._regExp, this.pattern); we return text.replace(this._regExp, this.buildReplaceString(match, preserveCase));

NOTE : I have changed test methods to the standard used in other functions to make it look cleaner as this was getting pretty messy , and existing test methods would cover this fix test cases

#81729

@skprabhanjan
Copy link
Contributor Author

@roblourens , Any updates on this ?

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Thanks!

@roblourens roblourens merged commit 334b636 into microsoft:master Oct 26, 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.

2 participants