[PR #4555] When patching profiles in, copy the user's indentation #25837

Open
opened 2026-01-31 09:12:08 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4555

State: closed
Merged: Yes


This will attempt to match the style of the user's JSON.

Caveats:

  1. If the user has no profiles, it'll explode. This isn't new.
  2. If the user's indentation style if {profile}, {profile}, {profile} (that is: no indentation), you'll get this:
{profile}, {profile}, {profile},
 {
     new profile content
 }

There may be something better we can do by copying their newline (or lack thereof) and using it in our generator or detecting the indentation of their members as well.
That's an exercise for later.

Ref #2805

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4555 **State:** closed **Merged:** Yes --- This will attempt to match the style of the user's JSON. Caveats: 1. If the user has no profiles, it'll explode. This isn't new. 2. If the user's indentation style if `{profile}, {profile}, {profile}` (that is: no indentation), you'll get this: ``` {profile}, {profile}, {profile}, { new profile content } ``` There may be something better we can do by copying their newline (or lack thereof) and using it in our generator or detecting the indentation of their members as well. That's an exercise for later. Ref #2805
claunia added the pull-request label 2026-01-31 09:12:08 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25837