Skip to content

Conversation

@yaisog
Copy link
Contributor

@yaisog yaisog commented Apr 1, 2023

Similar to their implementation in the new makepatches operator, $diff-text, using the same library, could also use the words and linesmodes. I believe there are quite a few cases that will be more intelligible if words mode were used. Similarly, highlighting whole lines may also be beneficial in some cases.

This PR adds the same diffLineWordMode and diffPartsToChars functions to $diff-text that were also added to strings.js as part of the implementation for the makepatches operator.

The documentation tiddler has also been completely overhauled to also allow for testing of the various options.

Closes #7358

@vercel
Copy link

vercel bot commented Apr 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Apr 3, 2023 5:39pm

@netlify
Copy link

netlify bot commented Jan 2, 2026

Deploy Preview for tiddlywiki-previews ready!

Name Link
🔨 Latest commit b59b01f
🔍 Latest deploy log https://app.netlify.com/projects/tiddlywiki-previews/deploys/6957cf07d659480008ba12b3
😎 Deploy Preview https://deploy-preview-7386--tiddlywiki-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2451.4 KB
PR 2453.9 KB

Diff: ⬆️ Increase: +2.5 KB


✅ Change Note Status

All change notes are properly formatted and validated!

📝 $:/changenotes/5.4.0/#7386

Type: feature | Category: widget
Release: 5.4.0

Add words and lines modes to diff-text widget

🔗 #7386

👥 Contributors: yaisog


📖 Change Note Guidelines

Change notes help track and communicate changes effectively. See the full documentation for details.

@Jermolene
Copy link
Member

Looks good, thank you @yaisog

@yaisog yaisog marked this pull request as ready for review January 5, 2026 10:52
@yaisog
Copy link
Contributor Author

yaisog commented Jan 5, 2026

To update this cleanly to the post-#9511 API for diff-match-patch, I made a new PR #9551 and will close this one.

@yaisog yaisog closed this Jan 5, 2026
@yaisog yaisog deleted the lines-and-words-for-diff-text branch January 8, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[IDEA] Add words and lines mode to $diff-text

3 participants