This page focuses on media and code presentation: images, admonitions, language labels, file titles, line highlights, diff markers, and long lines.

Admonitions

Tip

VuePress/VitePress-style tip admonition.

Note

Python-Markdown-style note admonition.

Warning

Use for information readers should not miss.

Danger

Use for destructive actions or serious risks.

:::: tip Tip
VuePress/VitePress-style `tip` admonition.
::::

!!! note "Note"
    Python-Markdown-style `note` admonition.

!!! warning "Warning"
    Use for information readers should not miss.

!!! danger "Danger"
    Use for destructive actions or serious risks.

Images

Local SVG placeholder with hills and “Markdown Image Example”Caption text for image styling tests.
![Local SVG placeholder with hills and “Markdown Image Example”](/static/example-image.svg)
*Caption text for image styling tests.*

Code

Inline code: code

Inline code: `code`

Plain fence

Sample text here...

Titled block

def greet(name):
    return f"Hello, {name}!"
```python title="hello.py"
def greet(name):
    return f"Hello, {name}!"
```

Line highlights

def greet(name):
    message = f"Hello, {name}!"
    print(message)
    return message
```python title="highlight.py" hl_lines="2 4-5"
def greet(name):
    message = f"Hello, {name}!"
    print(message)
    return message
```

Diff highlights

 function greet(name) {
Removed line: -  return "Hello, " + name;
Added line: +  return `Hello, ${name}!`;
 }
```diff title="example.patch"
 function greet(name) {
-  return "Hello, " + name;
+  return `Hello, ${name}!`;
 }
```

Indented code block

// Some comments
line 1 of code
line 2 of code
line 3 of code
    // Some comments
    line 1 of code
    line 2 of code
    line 3 of code

Nested fences

Outer fence

```
Sample text here...
```

Long line

curl "https://example.com/api/articles?category=markdown&tag=markdown&include=metadata,summary,content,links,license&sort=published_at_desc"
```bash
curl "https://example.com/api/articles?category=markdown&tag=markdown&include=metadata,summary,content,links,license&sort=published_at_desc"
```