mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibDiff: Add support for writing formatted context hunks
There is a little bit more complexity involved here than the other formats. In particular, this is due to the need to determine whether an addition line or removal line is just that, or a 'change'.
This commit is contained in:
parent
4bcf3ea0e1
commit
f02cf2704c
3 changed files with 119 additions and 0 deletions
|
@ -31,6 +31,8 @@ struct Line {
|
|||
Removal = '-',
|
||||
Context = ' ',
|
||||
|
||||
// NOTE: This should only be used when deconstructing a hunk into old and new lines (context format)
|
||||
Change = '!',
|
||||
};
|
||||
|
||||
static constexpr Operation operation_from_symbol(char symbol)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue