Esc

COMARK0703 · warning

comark/diff/stray-content

Put only the two code blocks inside a ::diff

A ::diff draws its two code blocks and nothing else, so text inside it is dropped. Write the explanation above or below the diff.

Incorrect

::diff
Feed the ducks twice a day.

```ts [src/ducks.ts]
const meals = 1
```
```ts
const meals = 2
```
::
md
lint-comark example.mdexample.md:1:1 comark/diff/stray-contentdiff "src/ducks.ts": only two code blocks can go inside a diff (found text).Put explanations above or below it.✖ 1 problem

Correct

Feed the ducks twice a day.

::diff
```ts [src/ducks.ts]
const meals = 1
```
```ts
const meals = 2
```
::
md
lint-comark example.md✔ No problems