From 35e959219d195a23b8eac9c71f26c3e13b07c302 Mon Sep 17 00:00:00 2001
From: Elliot Kang <kkang2097@gmail.com>
Date: Tue, 12 Sep 2023 17:14:39 -0700
Subject: [PATCH] prettify OutputParser

---
 packages/core/src/OutputParser.ts | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/packages/core/src/OutputParser.ts b/packages/core/src/OutputParser.ts
index 716e19be9..9de043c7a 100644
--- a/packages/core/src/OutputParser.ts
+++ b/packages/core/src/OutputParser.ts
@@ -61,18 +61,17 @@ function parseJsonMarkdown(text: string) {
 
   var left: number;
   var right: number;
-  if(left_square < left_brace && left_square != -1){
+  if (left_square < left_brace && left_square != -1) {
     left = left_square;
     right = text.lastIndexOf("]");
-  }
-  else{
+  } else {
     left = left_brace;
     right = text.lastIndexOf("}");
   }
   const jsonText = text.substring(left, right + 1);
   try {
     //Single JSON object case
-    if(left_square === -1){
+    if (left_square === -1) {
       return [JSON.parse(jsonText)];
     }
     //Multiple JSON object case.
-- 
GitLab