detect inline elements and prepend spaces