GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BaseMax/text-diff-checker: A web-based tool to compare two blocks of text and highlight differences with support for line-by-line and word-by-word comparison modes. Compare two texts and highlight differences.

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
preview
preview
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
diff.js
diff.js
 
 
index.html
index.html
 
 
styles.css
styles.css
 
 

Repository files navigation

Text Diff Checker

A web-based tool to compare two blocks of text and highlight differences with support for line-by-line and word-by-word comparison modes.

Text Diff Checker

Text Diff Checker

Features

  • Line-by-Line Mode: Compare texts line by line, showing which lines were added, removed, or unchanged
  • Word-by-Word Mode: Compare texts word by word for more granular differences
  • Visual Highlighting:
    • 🔴 Red background for removed content
    • 🟢 Green background for added content
    • ⚪ Gray for unchanged content
  • Clean Interface: Simple and intuitive user interface
  • Responsive Design: Works on desktop and mobile devices

Usage

  1. Open index.html in your web browser
  2. Enter your original text in the left text area
  3. Enter your modified text in the right text area
  4. Select comparison mode (Line-by-Line or Word-by-Word)
  5. Click "Compare" to see the differences highlighted
  6. Click "Clear" to reset all fields

How It Works

The diff checker uses the Longest Common Subsequence (LCS) algorithm to find the differences between two texts:

  • In Line-by-Line mode, it splits texts by newlines and compares each line
  • In Word-by-Word mode, it splits texts by whitespace and compares each word
  • The algorithm identifies additions (present in modified text), removals (present in original text), and unchanged portions

Files

  • index.html - Main HTML structure and interface
  • styles.css - Styling and visual design
  • diff.js - Diff algorithm implementation and logic

Example

Original Text:

Hello World
This is a test

Modified Text:

Hello World
This is a demo

Result (Line-by-Line):

  • Line 1: Unchanged
  • Line 2: Removed "This is a test", Added "This is a demo"

License

MIT License - See LICENSE file for details

About

A web-based tool to compare two blocks of text and highlight differences with support for line-by-line and word-by-word comparison modes. Compare two texts and highlight differences.

basemax.github.io/text-diff-checker/

Topics

cssdiff-jshtmljavascriptjavascript-diffjsjs-diffjs-text-difftext-difftext-diff-javascripttext-diff-jstext-difference-viewertext-differences

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.