mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix: Allow CR and LF control chars to be a part of the value (#2526)
To properly parse CSV data.
This commit is contained in:
parent
344c9fe57e
commit
4f31632863
@ -187,7 +187,7 @@ module.exports = function(RED) {
|
|||||||
// if separator is last char in processing string line (without end of line), add null value at the end - example: '1,2,3\n3,"3",'
|
// if separator is last char in processing string line (without end of line), add null value at the end - example: '1,2,3\n3,"3",'
|
||||||
k[j] = line.length - 1 === i ? null : "";
|
k[j] = line.length - 1 === i ? null : "";
|
||||||
}
|
}
|
||||||
else if ((line[i] === "\n") || (line[i] === "\r")) { // handle multiple lines
|
else if (((line[i] === "\n") || (line[i] === "\r")) && f) { // handle multiple lines
|
||||||
//console.log(j,k,o,k[j]);
|
//console.log(j,k,o,k[j]);
|
||||||
if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
|
if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
|
||||||
if ( node.template[j] && (node.template[j] !== "") ) {
|
if ( node.template[j] && (node.template[j] !== "") ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user