fix html, diff mode hook