Skip to content

Commit

Permalink
fix: fix safari 14 throw Invalid regular expression error
Browse files Browse the repository at this point in the history
  • Loading branch information
shuxiaotai committed Nov 19, 2020
1 parent b27ba8e commit 997366f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/converters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(/(?<!(\\))\|/, "\\|"))
.map(cell => cell.replace(/([^\\])\|/, "$1\\|"))
.join(" | ")
).join("\n") + " |";

Expand Down

0 comments on commit 997366f

Please sign in to comment.