From 997366f53ccff23510f3bd186888968f57a6f431 Mon Sep 17 00:00:00 2001 From: shuxiaotai <760684689@qq.com> Date: Thu, 19 Nov 2020 13:05:40 +0800 Subject: [PATCH] fix: fix safari 14 throw Invalid regular expression error --- lib/converters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/converters.js b/lib/converters.js index 0e8c0e2..7be9ab1 100644 --- a/lib/converters.js +++ b/lib/converters.js @@ -177,7 +177,7 @@ converters.table = (input, json2md) => { (Array.isArray(row) ? row : input.headers.map(col_id => row[col_id])) .map(cell => json2md(cell)) .map(cell => parseTextFormat(cell)) - .map(cell => cell.replace(/(? cell.replace(/([^\\])\|/, "$1\\|")) .join(" | ") ).join("\n") + " |";