mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
3.1 KiB
3.1 KiB
title, date, collections, categories, tags
| title | date | collections | categories | tags | |||
|---|---|---|---|---|---|---|---|
| Code Tabs Test | 2026-01-25T07:50:22+08:00 |
|
|
|
Code tabs test cases for grouped code blocks.
Default Name
print("Python")
fmt.Println("Go")
Custom Name
function sum(a, b) {
return a + b
}
console.log(sum(1, 2))
def sum(a, b):
return a + b
print(sum(1, 2))
Active Tab
function greet(name) {
return `Hello, ${name}!`
}
def greet(name):
return f"Hello, {name}!"
Shadow
function greet(name) {
return `Hello, ${name}!`
}
def greet(name):
return f"Hello, {name}!"
func greet(name string) string {
return fmt.Sprintf("Hello, %s!", name)
}
Mode
interface User {
id: number
name: string
}
interface User {
id: number
name: string
}
interface User {
id: number
name: string
}
Actions
echo "line 1"
echo "line 2"
echo "line 3"
echo "line 1"
echo "line 2"
echo "line 3"
printf "this is a very very very very very very very very very very very very very very very very long line"
function greet(name) {
return `Hello, ${name}!`
}
Expanded/Collapsed
function longFunction() {
console.log('This is a long function.')
console.log('It has many lines of code.')
console.log('The code block should be expanded by default.')
console.log('Lorem ipsum dolor sit amet, consectetur adipiscing elit.')
console.log('Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.')
console.log('Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.')
console.log('Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.')
console.log('Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.')
console.log('The end of the long function.')
}
function shortFunction() {
console.log('This is a short function.')
}
Code tabs inside other blocks
[!NOTE]+
print("Python")fmt.Println("Go")
{{< details open=true >}}
print("Python")
fmt.Println("Go")
{{< /details >}}