Revert "lib/strings.concatLines: call concatStringsSep directly" (#514350)
This commit is contained in:
+2
-1
@@ -337,6 +337,7 @@ rec {
|
||||
|
||||
/**
|
||||
Concatenate a list of strings, adding a newline at the end of each one.
|
||||
Defined as `concatMapStrings (s: s + "\n")`.
|
||||
|
||||
# Inputs
|
||||
|
||||
@@ -360,7 +361,7 @@ rec {
|
||||
|
||||
:::
|
||||
*/
|
||||
concatLines = str: concatStringsSep "\n" str + "\n";
|
||||
concatLines = concatMapStrings (s: s + "\n");
|
||||
|
||||
/**
|
||||
Given string `s`, replace every occurrence of the string `from` with the string `to`.
|
||||
|
||||
@@ -559,6 +559,10 @@ runTests {
|
||||
];
|
||||
expected = "a\nb\nc\n";
|
||||
};
|
||||
testConcatLinesEmpty = {
|
||||
expr = concatLines [ ];
|
||||
expected = "";
|
||||
};
|
||||
|
||||
testMakeIncludePathWithPkgs = {
|
||||
expr = (
|
||||
|
||||
Reference in New Issue
Block a user