@@ -222,9 +222,10 @@ public boolean equals(Object obj) {
222
222
* <pre>
223
223
* int maxNameLen = docs.stream().map(p -> p.name.length()).max(Integer::compare).get();
224
224
* </pre>
225
+ * @param lineTerminator The string to put at the end of each line, probably "\n", but could be "\n\n" or "\r\n" if you prefer.
225
226
*
226
227
*/
227
- public void appendUsage (StringBuilder builder , int maxNameLen ) {
228
+ public void appendUsage (StringBuilder builder , int maxNameLen , String lineTerminator ) {
228
229
229
230
maxNameLen += 6 ;
230
231
@@ -252,7 +253,7 @@ public void appendUsage(StringBuilder builder, int maxNameLen) {
252
253
.append ("default: " )
253
254
.append (defaultValue );
254
255
}
255
- builder .append (" \n \n " );
256
+ builder .append (lineTerminator );
256
257
}
257
258
258
259
/**
@@ -267,9 +268,10 @@ public void appendUsage(StringBuilder builder, int maxNameLen) {
267
268
* </pre>
268
269
* @param prefixStrip String to be removed from the beginning of each name (typically '--')
269
270
* @param prefixAdd String to be add to the beginning of each name (the namePrefix passed in to withEnvironmentVariablesGatherer)
271
+ * @param lineTerminator The string to put at the end of each line, probably "\n", but could be "\n\n" or "\r\n" if you prefer.
270
272
*
271
273
*/
272
- public void appendEnv (StringBuilder builder , int maxNameLen , String prefixStrip , String prefixAdd ) {
274
+ public void appendEnv (StringBuilder builder , int maxNameLen , String prefixStrip , String prefixAdd , String lineTerminator ) {
273
275
if (canBeEnvVar ) {
274
276
if (prefixStrip == null ) {
275
277
prefixStrip = "" ;
@@ -315,8 +317,7 @@ public void appendEnv(StringBuilder builder, int maxNameLen, String prefixStrip,
315
317
.append (defaultValue );
316
318
}
317
319
318
-
319
- builder .append ("\n \n " );
320
+ builder .append (lineTerminator );
320
321
}
321
322
}
322
323
0 commit comments