File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,5 +80,5 @@ export function Assembler<T extends FormatterType>(
8080 const lf = useOptions ?. eol === 'crlf' ? '\r\n' : '\n' ;
8181
8282 // combine strings and return
83- return strings . join ( lf ) + lf ;
83+ return strings . join ( lf ) + ( useOptions . trailingSpace ? lf : '' ) ;
8484}
Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ export interface IAssemblerInputOptions<T extends FormatterType>
8282 style : Partial < ICodeStyle > ;
8383 /** Do we process the code as if we know nothing about the source? */
8484 vanilla ?: boolean ;
85+ /** Do we have a trailing space or not? */
86+ trailingSpace ?: boolean ;
8587}
8688
8789/**
@@ -105,4 +107,5 @@ export const DEFAULT_ASSEMBLER_OPTIONS: IAssemblerOptions<FiddleFormatter> = {
105107 autoDoc : false ,
106108 styleAndFormat : true ,
107109 spaceOffset : 0 ,
110+ trailingSpace : true ,
108111} ;
You can’t perform that action at this time.
0 commit comments