Control diff chunkiness with `merge_threshold`
masterThe :merge_threshold option controls how much unchanged text is grouped with changes.
- Higher value: Produces "chunkier" diffs (more words grouped into a single
<ins>or<del>block). - Lower value (e.g., 0): Produces "choppier" diffs (more granular changes).
falseor-1: Disables merging across whitespace (will still merge whitespace itself).
# Granular/choppy diff
diff = HTMLDiff.diff(old_text, new_text, merge_threshold: 0)