File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -169,18 +169,19 @@ ${source}`;
169169 }
170170
171171 private createStatementsFromExpandedPlaceholders ( expandedSource : string , statement : Statement ) {
172+ // Trim and filter empty lines in one step.
172173 const expandedSourceLines = expandedSource
173174 . split ( '\n' )
174175 . map ( ( line ) => line . trim ( ) )
175176 . filter ( ( line ) => line . length > 0 ) ;
177+
176178 if ( expandedSourceLines . length === 1 ) {
177- // Save any expanded text back in to the statement:
179+ // Save the single expanded line back into the statement.
178180 statement . recordExpandedPlaceholders ( expandedSourceLines [ 0 ] ) ;
179181 return [ statement ] ;
180182 }
181183
182- // The expanded source is more than one line, so we will need to create multiple statements.
183- // This only happens if the placeholder was a multiple-line property from the query file.
184+ // Handle multiple-line placeholders.
184185 return expandedSourceLines . map ( ( expandedSourceLine , index ) => {
185186 const counter = `: statement ${ index + 1 } after expansion of placeholder` ;
186187 const newStatement = new Statement (
You can’t perform that action at this time.
0 commit comments