@@ -510,7 +510,8 @@ public PreprocessingState preprocessFileWithNotification(final PreprocessingStat
510510 }
511511
512512 if (rawString == null ) {
513- this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , state , context );
513+ this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , preprocessingState ,
514+ context );
514515 lastTextFileDataContainer = preprocessingState .popTextContainer ();
515516 if (preprocessingState .isIncludeStackEmpty ()) {
516517 break ;
@@ -538,7 +539,8 @@ public PreprocessingState preprocessFileWithNotification(final PreprocessingStat
538539 final boolean doPrintLn = presentedNextLine || !context .isCareForLastEol ();
539540
540541 if (isHashPrefixed (stringToBeProcessed , context )) {
541- this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , state , context );
542+ this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , preprocessingState ,
543+ context );
542544 final String extractedDirective =
543545 extractHashPrefixedDirective (stringToBeProcessed , context );
544546 switch (processDirective (preprocessingState , extractedDirective , context , false )) {
@@ -594,12 +596,14 @@ public PreprocessingState preprocessFileWithNotification(final PreprocessingStat
594596 textBlockBuffer .append (context .getEol ());
595597 }
596598 } else {
597- this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , state , context );
599+ this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter ,
600+ preprocessingState , context );
598601 textBlockBuffer .append (stringPrefix ).append (text );
599602 if (doPrintLn ) {
600603 textBlockBuffer .append (context .getEol ());
601604 }
602- this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , state , context );
605+ this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter ,
606+ preprocessingState , context );
603607 }
604608 } else if (isSingleDollarPrefixed (stringToBeProcessed , context .isAllowWhitespaces ())) {
605609 // Output the tail of the string to the output stream without comments
@@ -614,16 +618,19 @@ public PreprocessingState preprocessFileWithNotification(final PreprocessingStat
614618 textBlockBuffer .append (context .getEol ());
615619 }
616620 } else {
617- this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , state , context );
621+ this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter ,
622+ preprocessingState , context );
618623 textBlockBuffer .append (stringPrefix ).append (text );
619624 if (doPrintLn ) {
620625 textBlockBuffer .append (context .getEol ());
621626 }
622- this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , state , context );
627+ this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter ,
628+ preprocessingState , context );
623629 }
624630 } else {
625631 // Just string
626- this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , state , context );
632+ this .flushTextBufferForRemovedComments (textBlockBuffer , thePrinter ,
633+ preprocessingState , context );
627634
628635 final String strToOut = findTailRemover (stringToBeProcessed , context );
629636
@@ -642,7 +649,8 @@ public PreprocessingState preprocessFileWithNotification(final PreprocessingStat
642649 }
643650 }
644651 } else if (context .isKeepLines ()) {
645- flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , state , context );
652+ flushTextBufferForRemovedComments (textBlockBuffer , thePrinter , preprocessingState ,
653+ context );
646654 final String text = AbstractDirectiveHandler .PREFIX_FOR_KEEPING_LINES + rawString ;
647655 if (doPrintLn ) {
648656 thePrinter .println (text , context .getEol ());
0 commit comments