I suspect this is a XY problem. Why do you want to do that? Minimizing the amount of lines serves no practical purpose. If you want to make your file smaller, you should use a minifier which will compress way more than just line breaks.