Rework pre-formatted text logic