Code Blocks

MarkCharm Team

September 8, 2026

1 Fenced Code Blocks

MarkCharm supports syntax-highlighted fenced code blocks.

1.1 Python Example

def fibonacci(n: int) -> list[int]:
    """Generate the first n Fibonacci numbers."""
    if n <= 0:
        return []
    seq = [0, 1]
    while len(seq) < n:
        seq.append(seq[-1] + seq[-2])
    return seq[:n]

print(fibonacci(10))

1.2 JavaScript Example

const greet = (name) => {
    return `Hello, ${name}! Welcome to MarkCharm.`;
};

console.log(greet("World"));

1.3 SQL Example

SELECT u.name, COUNT(o.id) AS total_orders
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE u.active = TRUE
GROUP BY u.name
ORDER BY total_orders DESC
LIMIT 10;

1.4 Verbatim Block

This is a verbatim block.
No syntax highlighting is applied.
Special characters like **bold** and *italic* are NOT interpreted.