Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

Enable syntax highlighting by specifying the programming language after the opening backticks of a code block.

We use Shiki for syntax highlighting and support all available languages. See the full list of [languages](https://shiki.style/languages) in Shiki's documentation.
We use [Shiki](https://shiki.style/) for syntax highlighting and support all available languages. See the full list of [languages](https://shiki.style/languages) in Shiki's documentation.

Check warning on line 61 in code.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

code.mdx#L61

Did you really mean 'Shiki's'?

```java
class HelloWorld {
Expand Down Expand Up @@ -300,3 +300,27 @@
sayHello();
```
````

### Diff

Use `[!code ++]` and `[!code --]` to mark added and removed lines (add single line comments to the code). You can also mark multiple lines with a single comment, such as `[!code ++:3]` or `[!code --:5]`.

```js Diff Example icon="code" lines
const greeting = "Hello, World!"; // [!code ++]
function sayHello() {
console.log("Hello, World!"); // [!code --]
console.log(greeting); // [!code ++]
}
sayHello();
```

````mdx
```js Diff Example icon="code" lines
const greeting = "Hello, World!"; // [\!code ++]
function sayHello() {
console.log("Hello, World!"); // [\!code --]
console.log(greeting); // [\!code ++]
}
sayHello();
```
````