html smart preview - diff logic