Skip to content

Commit b93abe3

Browse files
committed
Improve readme code formatting
1 parent bf2bb50 commit b93abe3

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ If you are using **MDX/JSX/TSX** [`CodeBlock`](https://docusaurus.io/docs/markdo
3333
import CodeBlock from '@theme/CodeBlock';
3434
import MyComponentSource from '!!raw-loader!./myComponent';
3535

36-
<CodeBlock youtubeID="4HGNqFdaD34" language="jsx">{MyComponentSource}</CodeBlock>
36+
<CodeBlock
37+
youtubeID="4HGNqFdaD34"
38+
language="jsx"
39+
>
40+
{MyComponentSource}
41+
</CodeBlock>
3742
```
3843

3944
> You need to pass just the YouTube video ID, not the whole URL. You can get the `youtubeID` from the regular Youtube video URL - `https://www.youtube.com/watch?v=[youtubeID]`, or from the embed URL - `https://www.youtube.com/embed/[youtubeID]`.
@@ -59,7 +64,14 @@ If you are using **MDX/JSX/TSX** [`CodeBlock`](https://docusaurus.io/docs/markdo
5964
import CodeBlock from '@theme/CodeBlock';
6065
import MyComponentSource from '!!raw-loader!./myComponent';
6166

62-
<CodeBlock youtubeID="4HGNqFdaD34" "0:10-1:00"="(1)" "1:10-1:20"="(1,2-4)" language="jsx">{MyComponentSource}</CodeBlock>
67+
<CodeBlock
68+
youtubeID="4HGNqFdaD34"
69+
"0:10-1:00"="(1)"
70+
"1:10-1:20"="(1,2-4)"
71+
language="jsx"
72+
>
73+
{MyComponentSource}
74+
</CodeBlock>
6375
```
6476

6577
> The highlight range format is the same as in the [Docusaurus code blocks]( https://docusaurus.io/docs/markdown-features/code-blocks#highlighting-with-metadata-string), just with the `()` parentheses instead of the `{}` parentheses.

0 commit comments

Comments
 (0)