File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Syntax Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -232,15 +232,15 @@ public override string ToString()
232232 return token . Content ;
233233 }
234234
235- // If this is a zero-width token, skip it.
236- if ( token . Width == 0 )
235+ // At this point, if this is a zero-width token, we know there must be more
236+ // non-zero-width tokens. Break out of the loop to allocate a new string with all
237+ // of the content.
238+ if ( token . Width != 0 )
237239 {
238- continue ;
240+ break ;
239241 }
240242
241- // Otherwise, this is a non-zero-width token but there much be more tokens that make up the
242- // total width. Break out of the loop to allocate a new string with all of the content.
243- break ;
243+ // This was just a zero-width token - continue looping.
244244 }
245245
246246 // At this point, we know that we have multiple tokens and need to allocate a string.
You can’t perform that action at this time.
0 commit comments