Open harryadel opened 6 years ago
Table cells that contains commas are usually ignored if not causing misalignment, so we check if the text string contains a comma to escape it.
((val.textContent.indexOf(',') > -1) ? '"\'' : '"') + settings.formatValue(val.textContent.replace(/"/g, '""')) + '"';
The ES6 version of this solution is
`"'${settings.formatValue(val.textContent.replace(/"/g, '""'))}"`;
But we opted for the ES5 one for backwards compatibility, thanks!
Table cells that contains commas are usually ignored if not causing misalignment, so we check if the text string contains a comma to escape it.
The ES6 version of this solution is
But we opted for the ES5 one for backwards compatibility, thanks!