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
By default the language of a rendered fenced code block is derived from the source file extension (e.g. a snippet extracted from a `.cs` file renders as `csharp`). The language can be overridden per snippet by adding a `lang=` token as the first item inside the parenthesised metadata:
466
+
467
+
```csharp
468
+
// begin-snippet: SampleJson(lang=json)
469
+
{"hello":"world"}
470
+
// end-snippet
471
+
```
472
+
473
+
Renders as:
474
+
475
+
````markdown
476
+
<-- begin-snippet: SampleJson -->
477
+
```json
478
+
{"hello": "world"}
479
+
```
480
+
<-- end-snippet -->
481
+
````
482
+
483
+
`lang=` can be combined with Expressive Code metadata — the language token must come first, followed by a space, then the remaining metadata:
By default the language of a rendered fenced code block is derived from the source file extension (e.g. a snippet extracted from a `.cs` file renders as `csharp`). The language can be overridden per snippet by adding a `lang=` token as the first item inside the parenthesised metadata:
375
+
376
+
```csharp
377
+
// begin-snippet: SampleJson(lang=json)
378
+
{"hello":"world"}
379
+
// end-snippet
380
+
```
381
+
382
+
Renders as:
383
+
384
+
````markdown
385
+
<-- begin-snippet: SampleJson -->
386
+
```json
387
+
{"hello": "world"}
388
+
```
389
+
<-- end-snippet -->
390
+
````
391
+
392
+
`lang=` can be combined with Expressive Code metadata — the language token must come first, followed by a space, then the remaining metadata:
0 commit comments