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

Proper indentation of string interpolation #543

Open
layus opened this issue May 24, 2015 · 2 comments
Open

Proper indentation of string interpolation #543

layus opened this issue May 24, 2015 · 2 comments
Assignees
Labels

Comments

@layus
Copy link
Member

layus commented May 24, 2015

I have recently looked into https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/hardware/synaptics.nix whose interesting content is essentially :

let tapConfig = ''
      Option "MaxTapTime" "180"
      Option "MaxTapMove" "220"
    '';
in {
    services.xserver.config =
      ''
      ...
        # Automatically enable the synaptics driver for all touchpads.
          Section "InputClass"
            Identifier "synaptics touchpad catchall"
            MatchIsTouchpad "on"
            Driver "synaptics"
            ${tapConfig}
            Option "ClickFinger1" "1"
          EndSection
      '';
}

This piece of code results into

...
  # Automatically enable the synaptics driver for all touchpads.
  Section "InputClass"
    Identifier "synaptics touchpad catchall"
    MatchIsTouchpad "on"
    Driver "synaptics"
    Option "MaxTapTime" "180"
Option "MaxTapMove" "220"

    Option "ClickFinger1" "1"
  EndSection

instead of the expected

...
  # Automatically enable the synaptics driver for all touchpads.
  Section "InputClass"
    Identifier "synaptics touchpad catchall"
    MatchIsTouchpad "on"
    Driver "synaptics"
    Option "MaxTapTime" "180"
    Option "MaxTapMove" "220"
    Option "ClickFinger1" "1"
  EndSection

Is my interpretation a desirable behaviour ?
Stated differently : Would a patch fixing indentation of embedded indented strings be accepted ?

layus added a commit to layus/nix that referenced this issue May 27, 2015
In indented strings,
- Strip one last line from antiquotations when there exists one.
- Preserve the indentation level of the antiquotation for each line of
  the inserted text.
See the extra documentation for details.

Closes NixOS#543.
layus added a commit to layus/nix that referenced this issue May 27, 2015
In indented strings,
- Strip one last line from antiquotations when there exists one.
- Preserve the indentation level of the antiquotation for each line of
  the inserted text.
See the extra documentation for details.

Closes NixOS#543.
@shlevy shlevy added the backlog label Apr 1, 2018
@stale
Copy link

stale bot commented Feb 15, 2021

I marked this as stale due to inactivity. → More info

@stale
Copy link

stale bot commented May 1, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this as completed May 1, 2022
@thufschmitt thufschmitt reopened this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants