Syntax Highlighting Test
•less than a minute read•Your Name
codetesting
Syntax Highlighting Test
Let's see if our code highlighting works!
JavaScript
const greet = (name) => {
return `Hello, ${name}!`
}
console.log(greet("World"))
TypeScript
interface Person {
name: string
age: number
}
const person: Person = {
name: "John",
age: 30
}
Python
def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
print(factorial(5))
Headings Should Have Auto-Links
If you hover over the headings above, you should be able to click them to get anchor links thanks to rehype-slug and rehype-autolink-headings!