error when last line consists of 1-3 spaces
code blocks get unwanted empty lines