File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ var util = require('util');
55module . exports = function ( options ) {
66 var opts = util . _extend ( {
77 short : false ,
8- lineBreaks : true ,
98 indent : ' '
109 } , options ) ;
1110
@@ -38,5 +37,5 @@ module.exports = function (options) {
3837 code . push ( util . format ( '%s %s' , opts . short ? '-d' : '--data' , JSON . stringify ( this . source . postData . text ) ) ) ;
3938 }
4039
41- return code . join ( opts . lineBreaks ? ' \\\n' + opts . indent : ' ' ) ;
40+ return code . join ( opts . indent !== false ? ' \\\n' + opts . indent : ' ' ) ;
4241} ;
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ var util = require('util');
44
55module . exports = function ( options ) {
66 var opts = util . _extend ( {
7- lineBreaks : true ,
87 indent : ' '
98 } , options ) ;
109
@@ -35,5 +34,5 @@ module.exports = function (options) {
3534 } ) ;
3635 }
3736
38- return code . join ( opts . lineBreaks ? ' \\\n' + opts . indent : ' ' ) ;
37+ return code . join ( opts . indent !== false ? ' \\\n' + opts . indent : ' ' ) ;
3938} ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ require('should');
88describe ( 'cURL' , function ( ) {
99 it ( 'should convert simple request to cURL command' , function ( done ) {
1010 var result = new HTTPSnippet ( fixtures . simple ) . curl ( {
11- lineBreaks : false
11+ indent : false
1212 } ) ;
1313
1414 result . should . be . a . String ;
@@ -20,7 +20,7 @@ describe('cURL', function () {
2020 it ( 'should use short options' , function ( done ) {
2121 var result = new HTTPSnippet ( fixtures . simple ) . curl ( {
2222 short : true ,
23- lineBreaks : false
23+ indent : false
2424 } ) ;
2525
2626 result . should . be . a . String ;
@@ -31,7 +31,7 @@ describe('cURL', function () {
3131
3232 it ( 'should use --http1.0 for HTTP/1.0' , function ( done ) {
3333 var result = new HTTPSnippet ( fixtures . http1 ) . curl ( {
34- lineBreaks : false
34+ indent : false
3535 } ) ;
3636
3737 result . should . be . a . String ;
@@ -42,7 +42,6 @@ describe('cURL', function () {
4242
4343 it ( 'should use custom indentation' , function ( done ) {
4444 var result = new HTTPSnippet ( fixtures . simple ) . curl ( {
45- lineBreaks : true ,
4645 indent : '@'
4746 } ) ;
4847
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ require('should');
88describe ( 'httpie' , function ( ) {
99 it ( 'should convert simple request to httpie command' , function ( done ) {
1010 var result = new HTTPSnippet ( fixtures . simple ) . httpie ( {
11- lineBreaks : false
11+ indent : false
1212 } ) ;
1313
1414 result . should . be . a . String ;
@@ -19,7 +19,6 @@ describe('httpie', function () {
1919
2020 it ( 'should use custom indentation' , function ( done ) {
2121 var result = new HTTPSnippet ( fixtures . simple ) . httpie ( {
22- lineBreaks : true ,
2322 indent : '@'
2423 } ) ;
2524
You can’t perform that action at this time.
0 commit comments