H1 Heading
H2 Heading
H3 Heading
H4 Heading
H5 Heading
Text Formatting
This is bold text and this is italic text. You can also use bold, italic, or bold and italic together.
Strikethrough text and inline code.
Superscript: 2^10^ = 1024
Subscript: H~2~O
Horizontal Rule
Lists
Unordered List
- Item one
- Item two
- Nested item 2.1
- Nested item 2.2
- Item three
Ordered List
- First item
- Second item
- Nested numbered
- Another nested
- Third item
Task List
- Completed task
- Incomplete task
- Another task
Blockquote
This is a blockquote with bold text and
inline code.Nested blockquote
- List inside blockquote
- Another item
Code Blocks with Shiki
JavaScript
// Arrow function with destructuring
const calculateTotal = ({ price, quantity, tax = 0.08 }) => {
const subtotal = price * quantity;
return subtotal + subtotal * tax;
};
// Async/await example
async function fetchData(url) {
try {
const response = await fetch(url);
const data = await response.json();
return data;
} catch (error) {
console.error('Error fetching data:', error);
throw error;
}
}
// Class example
class User {
constructor(name, email) {
this.name = name;
this.email = email;
}
getProfile() {
return `${this.name} <${this.email}>`;
}
} Python
def calculate_total(price, quantity, tax=0.08):
subtotal = price * quantity
return subtotal + (subtotal * tax)