XHTMLDiff is a tool and library for taking valid XHTML documents as input, and generating redlined valid XHTML text highlighting the changes between them as output.
gem "xhtmldiff", "~> 1.0.0"