protected void displayText ( String text ) { if ( highLight != null && ! highLight . isEmpty ( ) && text . contains ( highLight ) ) { String highLightedText = text . replaceAll ( highLight , ansi ( ) . bold ( ) . bg ( theme . getHighLightBackground ( ) ) . fg ( theme . getHighLightForeground ( ) ) . a ( highLight ) . boldOff ( ) . reset ( ) . toString ( ) ) ; console . out ( ) . print ( highLightedText ) ; } else { console . out ( ) . print ( text ) ; } }
Displays Text highlighting the text that was marked as highlighted .