How to write diff for YAML? #3323
-
Beta Was this translation helpful? Give feedback.
Answered by
RunDevelopment
Feb 8, 2022
Replies: 1 comment 2 replies
-
Diff Highlight uses the unified diff format. The rules of this format are as follows:
Diff highlight supports the format in full, but you don't have to include range information. It will also work with diffs that don't have any range information. (Frankly, Diff highlight mostly ignores the range infos.)
You can do it by hand (see the rules above), but probably want to use a tool like git. It's pretty easy with the
Just copy'n'paste everything after the range information. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
simkimsia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Diff Highlight uses the unified diff format. The rules of this format are as follows:
+
is an addition.-
is a deletion.@@
contain range information.Diff highlight supports the format in full, but you don't have to include range information. It will also work with diffs that don't have any range information. (Frankly, Diff highlight mostly ignores the range infos.)
You can do it by hand (see the rules above), but probably want to use a tool like git. It's pretty easy with the
git diff <file>
command. E.g.: