You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorialkit.dev/src/content/docs/guides/creating-content.mdx
+33
Original file line number
Diff line number
Diff line change
@@ -192,6 +192,39 @@ const removed = 'This line was removed';
192
192
consthighlighted='This line is highlighted';
193
193
```
194
194
195
+
#### Useful Expressive Code Attributes
196
+
197
+
-**`title`** - Sets the title of the code block.
198
+
-**`frame`** - Defines the frame of the code block. Options: `"code"`, `"terminal"`, `"none"`, `"auto"`.
199
+
-**`showLineNumbers`** - Displays line numbers. You can combine this with `startLineNumber=#` to begin numbering from a specific line.
200
+
-**`wrap`** - Controls word wrapping. Use `preserveIndent` and `preserveIndent=false` to adjust indentation handling.
201
+
202
+
##### Marking Lines
203
+
204
+
-**`{x}`** - Marks specific lines. For example, `{6,10-18}` will mark lines 6 and 10 through 18.
205
+
-**`ins`** - Marks inserted lines. Example: `ins={6,10-18}`.
206
+
-**`del`** - Marks deleted lines. Example: `del={6,10-18}`.
207
+
-**`{"Label":x}`** - Assigns a label to a line or range of lines. Works with `mark`, `ins`, and `del`. Example: `{"Label1":5} del={"Label2":7-8} ins={"Label3":10-12}`. If the label is long, consider placing an empty line in the code for better readability.
208
+
-**`collapse={X-Y}`** - Collapses the specified lines. Example: `collapse={1-5,12-14}`.
209
+
210
+
##### Marking Text
211
+
212
+
You can highlight text using strings or regular expressions. For example:
'Hello, the words yes and yep will be marked. Also add1, add2, remove1, remove2',
225
+
)
226
+
```
227
+
195
228
#### Importing files
196
229
197
230
In addition to Expressive Code features, you can import files from your code template `_files` and `_solution` folders using the file or solution shortcodes. These shortcodes insert the content of the specified file directly into your lesson content.
0 commit comments