Formalize diff line-level metadata and prepare for new state.
Review Request #11902 — Created Jan. 4, 2022 and updated
Lines in a rendered diff have a dictionary field for storing move
information, and we have a couple other fields for other interesting
state. What we don't have is a field for general metadata, and this will
be important soon.
It will also be important not to completely break anything consuming
this line information. So, the moved information field is being
repurposed for general metadata, preserving
For the moment, this is mostly a documentation change within the chunk
generator. However, the
diff_linetemplate tag has also been updated
to prepare for some uses of this metadata field. This consists of
pulling out the field into a variable, and changing some processing to
avoid repeating logic (which will be important for the upcoming code
safety checks feature).
Unit tests passed.
Made use of this in the upcoming code safety checkers feature.