Somewhat related to #72
First of all, thanks for Difftastic! These foundational tools which reduce unnecessary work are invaluable, especially now with the high number of PRs created by AI agents.
The "before" and "after" JSX below both produce equivalent whitespace:
-{label} {required && <Asterisk />}
+{label}{' '}
+{required && <Asterisk />}
However, Difftastic currently shows them as changed:
$ cat > /tmp/difft-before.tsx <<'EOF'
{formField.label} {formField.required && <Asterisk />}
EOF
$ cat > /tmp/difft-after.tsx <<'EOF'
{formField.label}{' '}
{formField.required && <Asterisk />}
EOF
$ difft \
--display inline \
--color never \
/tmp/difft-before.tsx \
/tmp/difft-after.tsx
/tmp/difft-after.tsx --- TypeScript TSX
1 {formField.label} {formField.required && <Asterisk />}
1 {formField.label}{' '}
It would be nice if the whitespace text node and the {' '} expression were treated as equivalent, so only meaningful JSX changes are shown.
Difftastic: 0.69.0
Keywords for search: React
Somewhat related to #72
First of all, thanks for Difftastic! These foundational tools which reduce unnecessary work are invaluable, especially now with the high number of PRs created by AI agents.
The "before" and "after" JSX below both produce equivalent whitespace:
However, Difftastic currently shows them as changed:
It would be nice if the whitespace text node and the
{' '}expression were treated as equivalent, so only meaningful JSX changes are shown.Difftastic:
0.69.0Keywords for search: React