Esc

COMARK0708 · warning

comark/diff/language-mismatch

Give both blocks of a ::diff the same language

Both blocks are the same file, so they're highlighted as one language. When the languages differ, one side is highlighted wrong, and a block without a language isn't highlighted at all.

Incorrect

::diff
```ts [src/ducks.ts]
const meals = 1
```
```js
const meals = 2
```
::
md
lint-comark example.mdexample.md:1:1 comark/diff/language-mismatchdiff "src/ducks.ts": the before block is "ts" and the after block is "js".Give both the same language, like ```ts.✖ 1 problem

Correct

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