update documentations
This commit is contained in:
@@ -4,8 +4,6 @@ description: A component used to display code snippets with optional line number
|
||||
date: 14-12-2024
|
||||
---
|
||||
|
||||
The Code Block component is a component used to display code snippets with optional line numbering and line highlighting.
|
||||
|
||||
## Preview
|
||||
|
||||
```javascript:main.js showLineNumbers {3-4}
|
||||
@@ -19,7 +17,7 @@ function isRocketAboutToCrash() {
|
||||
|
||||
In this example, line numbers are displayed for lines 1 to 4. You can specify which lines to highlight using the format `{2,3-5}`.
|
||||
|
||||
## Usage
|
||||
## Output Markdown
|
||||
|
||||
You can directly use the following syntax to create a code block with line numbers and highlight specific lines:
|
||||
|
||||
@@ -34,7 +32,7 @@ function isRocketAboutToCrash() {
|
||||
```
|
||||
````
|
||||
|
||||
### Features
|
||||
## Features
|
||||
|
||||
- **Line Numbers**: Enable line numbers by adding `showLineNumbers` after the opening backticks.
|
||||
- **Highlight Lines**: Specify lines to highlight using curly braces (e.g., `{2,3-5}`).
|
||||
|
||||
Reference in New Issue
Block a user