Dont render blank blocks

Very similar to #217. This one also has lots of tests. We should coordinate better :-)

@hornairs, @boourns, @csfrancis, @camilo, @dylanahsmith, @arthurnn