From 012dfa5a74515a309da05c5b86ecb4b28c0d48ab Mon Sep 17 00:00:00 2001 From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com> Date: Wed, 30 Oct 2024 10:29:21 +0530 Subject: [PATCH] feat(listLineOutputParser): handle unclosed tags --- src/lib/outputParsers/listLineOutputParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/outputParsers/listLineOutputParser.ts b/src/lib/outputParsers/listLineOutputParser.ts index 1e2f0f5..fcd2f07 100644 --- a/src/lib/outputParsers/listLineOutputParser.ts +++ b/src/lib/outputParsers/listLineOutputParser.ts @@ -23,7 +23,7 @@ class LineListOutputParser extends BaseOutputParser { const startKeyIndex = text.indexOf(`<${this.key}>`); const endKeyIndex = text.indexOf(``); - if (startKeyIndex === -1 || endKeyIndex === -1) { + if (startKeyIndex === -1 && endKeyIndex === -1) { return []; }