IDEA-104221 Console folding rules allow to add empty substring and after this console folding is not working anymore

Possible fix for IDEA-10221.
Please review.