Skip to content

Commit

Permalink
CSV - swap to regex replace for node14 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Conway-Jones committed Dec 19, 2022
1 parent f6901cd commit 2429191
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/node_modules/@node-red/nodes/core/parsers/70-CSV.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ module.exports = function(RED) {
function CSVNode(n) {
RED.nodes.createNode(this,n);
this.template = (n.temp || "");
this.sep = (n.sep || ',').replaceAll("\\t","\t").replaceAll("\\n","\n").replaceAll("\\r","\r");
this.sep = (n.sep || ',').replace(/\\t/g,"\t").replace(/\\n/g,"\n").replace(/\\r/g,"\r");
this.quo = '"';
this.ret = (n.ret || "\n").replaceAll("\\n","\n").replaceAll("\\r","\r");
this.ret = (n.ret || "\n").replace(/\\n/g,"\n").replace(/\\r/g,"\r");
this.winflag = (this.ret === "\r\n");
this.lineend = "\n";
this.multi = n.multi || "one";
Expand Down

0 comments on commit 2429191

Please sign in to comment.