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

Extend quoting of CSV output #1586

Merged
merged 2 commits into from Oct 25, 2017
Merged

Extend quoting of CSV output #1586

merged 2 commits into from Oct 25, 2017

Conversation

jodastephen
Copy link
Member

If a CSV entry starts with an expression prefix character
then prefix the quoted section by equals
This is invalid pure CSV, but accepted by Excel/Google
to indicate a test formatted cell
Update CSV input to parse equals prefix format

If a CSV entry starts with an expression prefix character
then prefix the quoted section by equals
This is invalid pure CSV, but accepted by Excel/Google
to indicate a test formatted cell
Update CSV input to parse equals prefix format
}

private boolean isExpressionPrefix(String entry) {
char first = entry.length() == 0 ? ' ' : entry.charAt(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels odd to be assigning empty char here given we know empty char will always return false in the subsequent check. Admittedly the alternatives would require more code but this is abit random IMO.

@jodastephen jodastephen merged commit b41c886 into master Oct 25, 2017
@jodastephen jodastephen deleted the topic/csv branch October 25, 2017 17:59
@jodastephen jodastephen added this to the v1.5 milestone Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants