Releases: sitefinitysteve/vue-diff-text
Releases · sitefinitysteve/vue-diff-text
v1.5.4
Bug Fix: Garbled interleaving on partial text replacement
ignoreFormattingTagsnow defaults totrue— 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
Bug Fixes
- Set default
orphanMatchThreshold: 0.3in 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
orphanMatchThresholdvia options prop
Docs
- Added link to php-diff-text package in README
v1.5.0
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 ignoreFormattingTagsprop 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 outputnormalizeQuotesandstripFormattingTagsutility functions (src/utils/normalizeHtml.ts)- Comprehensive test suites for quote normalization and formatting tag stripping (DiffHtml + normalizeHtml)
Changed
- DiffHtml now pipes both
oldTextandnewTextthrough a normalization step before computing the diff - ESLint config, lint scripts (
lint,lint:fix), and Huskypreparescript added topackage.json - Self-closing tag formatting applied to DiffHtml template
v1.4.0
Added
similarity-thresholdprop 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 diffcomputeTextSimilarityutility using Dice coefficient viadiffWords- 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
Added
- DiffHtml component using diffblazer for HTML-aware diffing
diffblazerdependency for HTML diff support
Changed
- Updated description for clarity on component functionality
v1.2.1
Fixed
- CSS import documentation — removed automatic CSS import, users must import explicitly
v1.2.0
Changed
- Converted from scoped CSS to global CSS with
.text-diffclass scoping for easier customization
v1.1.2
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
Fixed
- Module resolution — corrected file paths in package.json
v1.1.0
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