From d972549340449d45f961483712823dd3c1c21528 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 14 Dec 2024 00:33:53 +0100 Subject: [PATCH] Update index.ts --- src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 377cc64..ea2b954 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,8 +39,10 @@ async function executeQueryPretty(query: string): Promise { // Print the SQL query within ```sql tags const chunks = ['```sql\n', query, ' \n', '```\n', '\n']; const p = new Table(result); - chunks.push(p.render()); - chunks.push('\n'); + const tableStr = p.render(); + chunks.push('```\n'); + chunks.push(tableStr.toString()); + chunks.push('```\n'); resolve(chunks); } });