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

Fallback writeOptions.lineBreak not consistent #34

Merged
merged 1 commit into from Jul 1, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/csv.js
Expand Up @@ -414,7 +414,7 @@ module.exports = function(){
line.splice(csv.writeOptions.columns.length);
}
if(line instanceof Array){
var newLine = state.countWriten ? csv.writeOptions.lineBreaks || "\r" : '';
var newLine = state.countWriten ? csv.writeOptions.lineBreaks || "\r\n" : '';
for(var i=0; i<line.length; i++){
var field = line[i];
if(typeof field === 'string'){
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -145,7 +145,7 @@ Options are:
Display the column names on the first line if the columns option is provided.

- *lineBreaks*
String used to delimit record rows or a special value; special values are 'auto', 'unix', 'mac', 'windows', 'unicode'; default to 'auto' (discovered in source).
String used to delimit record rows or a special value; special values are 'auto', 'unix', 'mac', 'windows', 'unicode'; default to 'auto' (discovered in source or 'windows' if no source is specified).

- *flags*
Default to 'w', 'w' to create or overwrite an file, 'a' to append to a file. Apply when using the `toPath` method.
Expand Down