Skip to content

comark/magic-move/single-step

Give every ::magic-move two code blocks or more

A ::magic-move animates from one code block to the next, so it needs two or more. With one, there's nothing to move between, and with none it renders an empty frame. Usually the next step went missing in an edit, or the code belongs in a plain code block.

Incorrect

Start
const total = price * 2
ts
::magic-move
```ts [Start]
const total = price * 2
```
::
md

Correct

Start
const total = price * 2
ts
Extract
const rate = 2
const total = price * rate
ts
::magic-move
```ts [Start]
const total = price * 2
```

```ts [Extract]
const rate = 2
const total = price * rate
```
::
md