Skip to content

Conversation

@spenserblack
Copy link
Contributor

@spenserblack spenserblack commented Jan 6, 2026

This is a bit of a nitpick on how to write strings when they contain Windows-like paths. Generally, I think that raw strings are preferable in this scenario because

  • It's a bit easier to read and more familiar (it looks like what you would write in cmd.exe).
  • It prevents accidentally escaping a character by writing \ instead of \\. I think that characters like newlines (\n), tabs (\t), etc. are rare enough in paths that this is a reasonable trade-off.

I noticed a lot of other places where there were strings with \\ that could be converted to raw strings. If this stylistic change makes sense, I can convert all of those if wanted. Right now I was just focusing on the documentation that I was reading.

@spenserblack spenserblack changed the title Encourage usage raw strings in registry docs Encourage using raw strings in registry docs Jan 6, 2026
@spenserblack spenserblack force-pushed the chore/string-style-nitpick branch from e4da23a to 53bbd6a Compare January 6, 2026 02:16
@riverar riverar requested review from kennykerr and riverar January 6, 2026 15:35
Copy link
Collaborator

@kennykerr kennykerr left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! This seems reasonable for docs. I wouldn't be in favor of widespread changes just for the sake of using raw string literals. That could amount to a lot of churn for little benefit.

@kennykerr kennykerr merged commit 86fedaf into microsoft:master Jan 6, 2026
29 checks passed
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