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

Convert to Raw String changes significant line endings #70209

Closed
sharwell opened this issue Oct 2, 2023 · 1 comment · Fixed by #76120
Closed

Convert to Raw String changes significant line endings #70209

sharwell opened this issue Oct 2, 2023 · 1 comment · Fixed by #76120
Assignees
Labels
Milestone

Comments

@sharwell
Copy link
Member

sharwell commented Oct 2, 2023

Version Used: Version 17.8.0 Preview 3.0 [34127.298.main]

Steps to Reproduce:

var first = @"

";

var second = Regex.Replace(description, "(\r?\n)", "$1$1");
  1. Place the caret before @" in the initializer for first
  2. Select the Convert to raw string refactoring
  3. Select Fix All in Document

Expected Behavior:

var first = """



""";

var second = Regex.Replace(description, "(\r?\n)", "$1$1");

Actual Behavior:

var first = """



""";

var second = Regex.Replace(description, """
(
?
)
""", "$1$1");
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 2, 2023
@CyrusNajmabadi CyrusNajmabadi self-assigned this Oct 2, 2023
@CyrusNajmabadi
Copy link
Member

Yup. Not desirable. Will refine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants