Skip to main content
100%

htmldiff

✓ Published0🌍 Public
Aalessioalex
Last edited Jan 31, 2021
Created on Jan 31, 2021

htmldiff visualizes changes between two HTML documents by rendering the before and after versions side-by-side with matching content highlighted. It uses a custom tokenizer to split HTML into tags, words, and whitespace, then applies a diff algorithm that finds matching blocks and computes insertions, deletions, and replacements. The result is displayed through a renderer that wraps changed segments with styled spans, making edits immediately visible. The code relies on plain JavaScript DOM manipulation and CSS classes rather than external visualization libraries.

AI-generated description

Similar vizzes