feat: support email-quoted diffs #149
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/diffs.nvim!149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/email-quoted-diffs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Email-quoted diffs (
> diff --git ...,> @@ ...) from git-send-email / email reply workflows produce 0 hunks because the parser matches patterns against raw lines containing>quote prefixes. Closes #141.Solution
Strip the
>quote prefix before pattern matching in the parser. Storequote_widthon each hunk. Inhighlight.lua, offset all extmark column positions byqwand expandpw > 1guards toqw > 0 or pw > 1for DiffsClear suppression. Clamp body prefix DiffsClearend_colto the actual buffer line byte length for bare>lines (1-byte buffer lines whereend_col = pw + qwwould exceed bounds and causenvim_buf_set_extmarkto silently fail insidepcall).15 new specs covering parser detection, stripping, false-positive rejection, and highlight column offsets including the bare
>clamp edge case.