Add compare-docs function.