Skip to content

Diff Syntax

Diff syntax is supported when used with Expressive Code. See their docs on using diff syntax. (If you are using Starlight, Expressive Code is already included.)

Lines that begin with - are removed from the rendered code.

```diff live lang="html"
<div>
- <button>hello world</button>
+ <button>hello new world</button>
</div>
```

becomes

<div>
<button>hello world</button>
<button>hello new world</button>
</div>