Normalize line content after appending and prepending content