Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified the GuessDelimiter function. #593

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions papaparse.js
Expand Up @@ -1262,7 +1262,7 @@ if (!Array.isArray)

if (typeof fieldCountPrevRow === 'undefined')
{
fieldCountPrevRow = fieldCount;
fieldCountPrevRow = 0;
continue;
}
else if (fieldCount > 1)
Expand All @@ -1275,7 +1275,7 @@ if (!Array.isArray)
if (preview.data.length > 0)
avgFieldCount /= (preview.data.length - emptyLinesCount);

if ((typeof bestDelta === 'undefined' || delta < bestDelta)
if ((typeof bestDelta === 'undefined' || delta > bestDelta)
&& avgFieldCount > 1.99)
{
bestDelta = delta;
Expand Down