-
-
Couldn't load subscription status.
- Fork 62
Description
Description
When a string has a long interpolation, the string gets split onto multiple lines but when this is done, the string is still absorbed. The trivial case with just one oversized interpolation (see examples) is technically legal under the RFC style as only the first and last line are not indented. This looks very odd however and is different to how function arguments are handled which have a similar problem of trailing content behind an otherwise absorbable term.
nixfmt will however also not indent intermediate interpolations ends which is definitely not legal. It also doesn't matter whether it's a single-line or multi-line string.
changelog = ''https://gitlab.freedesktop.org/freetype/freetype/-/raw/VER-${
builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.version
}/docs/${
builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.versionloooooooooooooooooooooooooooooooooong
}CHANGES'';When a string is split onto multiple lines for whatever reason, we should probably just always not absorb which is in line with how function arguments work.
Small example input
changelog = "https://gitlab.freedesktop.org/freetype/freetype/-/raw/VER-${builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.version}/docs/CHANGES";Expected output
changelog =
"https://gitlab.freedesktop.org/freetype/freetype/-/raw/VER-${
builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.version
}/docs/CHANGES";Actual output
changelog = "https://gitlab.freedesktop.org/freetype/freetype/-/raw/VER-${
builtins.replaceStrings [ "." ] [ "-" ] finalAttrs.version
}/docs/CHANGES";Metadata
Metadata
Assignees
Labels
Type
Projects
Status