52ca30273f
* command/format: fix list nested attr diff rendering Previously, diffs only rendered correctly if all changed elements appeared before all unchanged elements. Once an unchanged element was found, all remaining elements were skipped. This usually led to the output being an empty list with a weird amount of space between the brackets. * command/format: improve list nested attr rendering This makes several changes that make diffs for lists clearer and more consistent: * Separate items with brackets instead of only new lines. This better matches the input syntax and avoids confusion from the first and last brackets implying there is a single item. * Render an action symbol for each element of the list * Use the correct action symbol for new and deleted items * Fix the alignment of opening and closing brackets I also refactored the structure so it is similar to the set and map cases to minimize duplication of the new prints. * Fix re-use of blockBodyDiffResult struct |
||
---|---|---|
.. | ||
diagnostic.go | ||
diagnostic_test.go | ||
diff.go | ||
diff_test.go | ||
difflanguage_string.go | ||
format.go | ||
object_id.go | ||
object_id_test.go | ||
state.go | ||
state_test.go | ||
trivia.go |