Skip to content

Commit a9339ba

Browse files
committed
update: implemented logic for listToString yaml tag
1 parent 1684b44 commit a9339ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/yaml.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ export const includeType = new yaml.Type("!include", {
203203
* See the tests for example usage.
204204
*/
205205
export const listToStringType = new yaml.Type("!listToString", {
206-
kind: "scalar",
206+
kind: "sequence",
207207
construct(data) {
208208
try {
209-
return readFromYaml(data);
209+
return data.filter((d) => typeof d === "string").join("");
210210
} catch (e) {
211211
return data;
212212
}
@@ -249,7 +249,7 @@ export const readFileType = new yaml.Type("!readFile", {
249249
*/
250250
export const concatStringType = new yaml.Type("!concatString", {
251251
kind: "sequence",
252-
resolve(data) {
252+
resolve(data) {
253253
return data.every((d) => lodash.isString(d));
254254
},
255255
construct(data) {

0 commit comments

Comments
 (0)