From 59e3d70a23656c69fa1cba9e65a677ca9d3d3723 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Mon, 29 Nov 2021 13:31:50 +0100 Subject: [PATCH] Preserve quotes inside unquoted field Signed-off-by: CrazyMax --- .github/workflows/ci.yml | 2 +- __tests__/meta.test.ts | 4 ++-- dist/index.js | 1 + src/context.ts | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b846b72..9e317a98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,7 +162,7 @@ jobs: labels: | maintainer=CrazyMax org.opencontainers.image.title=MyCustomTitle - org.opencontainers.image.description=Another description + org.opencontainers.image.description=this is a "good" example org.opencontainers.image.vendor=MyCompany json: diff --git a/__tests__/meta.test.ts b/__tests__/meta.test.ts index 2aaaed71..ecc0dfb3 100644 --- a/__tests__/meta.test.ts +++ b/__tests__/meta.test.ts @@ -1921,7 +1921,7 @@ describe('latest', () => { labels: [ "maintainer=CrazyMax", "org.opencontainers.image.title=MyCustomTitle", - "org.opencontainers.image.description=Another description", + `org.opencontainers.image.description=this is a "good" example`, "org.opencontainers.image.vendor=MyCompany", ] } as Inputs, @@ -1945,7 +1945,7 @@ describe('latest', () => { "org.opencontainers.image.licenses=MIT", "maintainer=CrazyMax", "org.opencontainers.image.title=MyCustomTitle", - "org.opencontainers.image.description=Another description", + `org.opencontainers.image.description=this is a "good" example`, "org.opencontainers.image.vendor=MyCompany" ] ], diff --git a/dist/index.js b/dist/index.js index 11dfd781..625c27e3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -74,6 +74,7 @@ function getInputList(name, ignoreComma) { } for (let output of sync_1.default(items, { columns: false, + relax: true, relaxColumnCount: true, skipLinesWithEmptyValues: true })) { diff --git a/src/context.ts b/src/context.ts index 26235ad1..4fd5e547 100644 --- a/src/context.ts +++ b/src/context.ts @@ -48,6 +48,7 @@ export function getInputList(name: string, ignoreComma?: boolean): string[] { for (let output of csvparse(items, { columns: false, + relax: true, relaxColumnCount: true, skipLinesWithEmptyValues: true }) as Array) {