Trims a text-node for the sake of the inspector view