From 1caec2c48a804e889084887ea9627bdbb61278c1 Mon Sep 17 00:00:00 2001 From: Ahmed Thahir Date: Tue, 20 Feb 2024 19:50:01 +0400 Subject: [PATCH] Fix: Add pipes to start and end of lines --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 3f09b3b..de36ab3 100644 --- a/index.js +++ b/index.js @@ -44,8 +44,12 @@ function invertMarkdownTable(markdown) { }) .join(' | '); }) + .map( + function(line) { + return "|" + line + "|" + } + ) .join('\n'); - return text; } // 1 for English characters, 'us' -> 2