You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that there is an encloser function. In the comments it states that when using a comma in the field, it will be enclosed by "".
I'm using types.csv with delimiter ";". But if my cell contains ";" it will not enclose them.
I suppose the encloser function should take the chosen delimiter into account (or both "," and ";").
// Rule: Fields that contain commas must begin and end with double quotes.
// .. other rules
function encloser (value: string) {
const enclosingCharacter = /,|"|\n/.test(value) ? '"' : ''
const escaped = value.replace(/"/g, '""')
I noticed that there is an encloser function. In the comments it states that when using a comma in the field, it will be enclosed by "".
I'm using types.csv with delimiter ";". But if my cell contains ";" it will not enclose them.
I suppose the encloser function should take the chosen delimiter into account (or both "," and ";").
// Rule: Fields that contain commas must begin and end with double quotes.
// .. other rules
function encloser (value: string) {
const enclosingCharacter = /,|"|\n/.test(value) ? '"' : ''
const escaped = value.replace(/"/g, '""')
return
${enclosingCharacter}${escaped}${enclosingCharacter}
}
The text was updated successfully, but these errors were encountered: