keep dom elements for lines if possible