From f59570a504c1fa0f574496fbcb7b4f5a14b984e0 Mon Sep 17 00:00:00 2001 From: Achim Friedland Date: Sun, 22 Sep 2024 10:34:48 +0200 Subject: [PATCH] Little workaround to parse unusual OCMF and Alfen transparency data --- src/ts/chargy.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ts/chargy.ts b/src/ts/chargy.ts index 7aa67d3..8b97a24 100644 --- a/src/ts/chargy.ts +++ b/src/ts/chargy.ts @@ -462,6 +462,9 @@ export class Chargy { else if (textContent?.startsWith("OCMF")) processedFile.result = await new OCMF(this).TryToParseOCMFDocument(textContent); + else if (textContent?.startsWith("\"OCMF") && textContent?.endsWith("\"")) + processedFile.result = await new OCMF(this).TryToParseOCMFDocument(textContent.substring(1, textContent.length - 1)); + //#endregion //#region ALFEN processing @@ -469,6 +472,9 @@ export class Chargy { else if (textContent?.startsWith("AP;")) processedFile.result = await new Alfen(this).TryToParseALFENFormat(textContent, {}); + else if (textContent?.startsWith("\"AP;") && textContent?.endsWith("\"")) + processedFile.result = await new Alfen(this).TryToParseALFENFormat(textContent.substring(1, textContent.length - 1), {}); + //#endregion //#region Public key processing (PEM format)