COMARK0705 · warning
comark/diff/unified-diff
Write a ::diff as before and after, not as a unified diff
A ::diff works out the changed lines and words itself, from the file before and after. A unified diff with + and - lines in one block shows up as a deleted file, every line removed with its markers and without the file's highlighting. Write the old lines in one block and the new lines in another, in the file's language.
Incorrect
::diff{file="src/ducks.ts"}
```diff
-const meals = 1
+const meals = 2
```
:: lint-comark example.mdexample.md:1:14 comark/diff/unified-diffWrite the old lines in the first block and the new lines in the second, each in the file's language, like ```ts.✖ 1 problem
Correct
::diff
```ts [src/ducks.ts]
const meals = 1
```
```ts
const meals = 2
```
:: lint-comark example.md✔ No problems