Skip to content

Releases: sitefinitysteve/vue-diff-text

v1.5.4

10 Mar 19:30

Choose a tag to compare

Bug Fix: Garbled interleaving on partial text replacement

  • ignoreFormattingTags now defaults to true — inline formatting tags (<strong>, <em>, etc.) no longer create separate token groups in diffblazer, preventing garbled word-by-word interleaving when formatting differs between old and new text
  • Added regression tests for real-world HTML content with <p> and <strong> tags

v1.5.2

10 Mar 17:38

Choose a tag to compare

Bug Fixes

  • Set default orphanMatchThreshold: 0.3 in htmldiff options to prevent garbled interleaving on partial text replacements

Tests

  • Added test coverage for partial text replacement producing clean block diffs
  • Added test for small word-level changes still producing fine-grained diffs
  • Added test for small additions at end of text
  • Added test for consumer overriding orphanMatchThreshold via options prop

Docs

v1.5.0

10 Mar 12:44

Choose a tag to compare

Added

  • Quote normalization — smart/curly quotes (""'') are now automatically normalized to straight quotes before diffing in DiffHtml, eliminating false diffs caused by copy-paste from word processors or CMS editors
  • ignoreFormattingTags prop for DiffHtml — strips inline formatting tags (<strong>, <em>, <b>, <i>, <u>, <s>, <mark>, <sub>, <sup>) before diffing so style-only changes don't produce noisy output
  • normalizeQuotes and stripFormattingTags utility functions (src/utils/normalizeHtml.ts)
  • Comprehensive test suites for quote normalization and formatting tag stripping (DiffHtml + normalizeHtml)

Changed

  • DiffHtml now pipes both oldText and newText through a normalization step before computing the diff
  • ESLint config, lint scripts (lint, lint:fix), and Husky prepare script added to package.json
  • Self-closing tag formatting applied to DiffHtml template

v1.4.0

09 Mar 02:31

Choose a tag to compare

Added

  • similarity-threshold prop for DiffHtml — when text similarity falls below the threshold, renders a clean full replacement (old text deleted, new text added) instead of garbled word-level diff
  • computeTextSimilarity utility using Dice coefficient via diffWords
  • Test suite with Vitest covering all 6 component types and similarity utility (45 tests)
  • ESLint 9 + Husky pre-commit hook (lint + test)
  • CHANGELOG.md
  • Demo section showing similarity threshold with side-by-side comparison
  • Playground threshold slider for DiffHtml

Changed

  • DiffHtml template now supports conditional full-replacement rendering

v1.3.0

09 Mar 02:31

Choose a tag to compare

Added

  • DiffHtml component using diffblazer for HTML-aware diffing
  • diffblazer dependency for HTML diff support

Changed

  • Updated description for clarity on component functionality

v1.2.1

09 Mar 02:31

Choose a tag to compare

Fixed

  • CSS import documentation — removed automatic CSS import, users must import explicitly

v1.2.0

09 Mar 02:31

Choose a tag to compare

Changed

  • Converted from scoped CSS to global CSS with .text-diff class scoping for easier customization

v1.1.2

09 Mar 02:31

Choose a tag to compare

Added

  • Specific CSS class names per component (text-diff-chars, text-diff-words, etc.) for targeted styling

Fixed

  • Vue dependency moved to peerDependencies to prevent multiple Vue instances

v1.1.1

09 Mar 02:31

Choose a tag to compare

Fixed

  • Module resolution — corrected file paths in package.json

v1.1.0

09 Mar 02:31

Choose a tag to compare

Added

  • DiffChars, DiffWords, DiffLines, DiffSentences components
  • Interactive demo app with playground
  • CSS variable support for customizing diff colors
  • Options passthrough to underlying jsdiff library

Changed

  • Renamed from single TextDiff to multiple specialized components