I hope you enjoy reading this blog post. If you want my team to just do your marketing for you, click here.
We’ve all had these problems working with WordPress as designers where you are trying to format an article or something for a client and have everything lined up perfectly, publish the article, only to find out that WordPress has removed all your manual line-breaks!
Fortunately there is a pretty simple fix, I had to edit formatting.php in order to keep wpautop() from removing my deliberate breaks. I commented out the following line which replaces two occurrences of BR separated only by whitespace with two newlines:
//$pee = preg_replace('|
|', "\n\n", $pee);
Then, I commented out this line found towards the end of the function and replaced it with a version that exempts BRs from being removed:
//$pee = preg_replace('!
(\s*]*>)!', '$1', $pee);
$pee = preg_replace('!(\s*]*>)!', '$1', $pee);
This keeps wordpress from stripping the breaks, but it does not keep Tiny MCE from doing it if you go to visual mode.