Skip to content

Commit

Permalink
Fixed wrong csv delimiter regex
Browse files Browse the repository at this point in the history
  • Loading branch information
notz authored Jul 30, 2020
1 parent b523095 commit 44ae2e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grunt/helpers/Translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class Translate {
this.log(`Encoding not detected used utf-8 ${filename}`);
}
let csvDelimiter = this.csvDelimiter;
const firstLineMatches = fileContent.match(/.+\/"{0,1}.{1}/);
const firstLineMatches = fileContent.match(/.+\/"{0,1}[,;\t]{1}/);
if (firstLineMatches && firstLineMatches.length) {
const detectedDelimiter = firstLineMatches[0].slice(-1);
if (detectedDelimiter !== this.csvDelimiter) {
Expand Down

0 comments on commit 44ae2e9

Please sign in to comment.