improving set delimiter state to avoid repetition
introducing new line tokens to avoid rendering standalone tags