mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-29 07:01:44 +00:00
* feat(include): support VS Code-style #region extraction for code files * chore: add changeset for include code region support * improve perf & fix bugs * Docs: introduce region support --------- Co-authored-by: Fuma Nama <[email protected]>
118 lines
1.5 KiB
Plaintext
118 lines
1.5 KiB
Plaintext
## Using JSX
|
|
|
|
Full:
|
|
|
|
> # Hello World \[#heading]
|
|
>
|
|
> Hey there!
|
|
>
|
|
> <section id="section-in-jsx">
|
|
> This is My Test.
|
|
>
|
|
> ### Nested Heading
|
|
>
|
|
> ```ts
|
|
> console.log('Hello World');
|
|
> ```
|
|
> </section>
|
|
>
|
|
> :::section{#section-in-directive}
|
|
> ### Heading in Directive
|
|
>
|
|
> some content inside.
|
|
> :::
|
|
|
|
First Heading:
|
|
|
|
> # Hello World
|
|
>
|
|
> Hey there!
|
|
>
|
|
> <section id="section-in-jsx">
|
|
> This is My Test.
|
|
>
|
|
> ### Nested Heading
|
|
>
|
|
> ```ts
|
|
> console.log('Hello World');
|
|
> ```
|
|
> </section>
|
|
>
|
|
> :::section{#section-in-directive}
|
|
> ### Heading in Directive
|
|
>
|
|
> some content inside.
|
|
> :::
|
|
|
|
In JSX:
|
|
|
|
> This is My Test.
|
|
>
|
|
> ### Nested Heading
|
|
>
|
|
> ```ts
|
|
> console.log('Hello World');
|
|
> ```
|
|
|
|
In Directive:
|
|
|
|
> ### Heading in Directive
|
|
>
|
|
> some content inside.
|
|
|
|
## Using Directives
|
|
|
|
In Directive:
|
|
|
|
> ### Heading in Directive
|
|
>
|
|
> some content inside.
|
|
|
|
Inline Directive:
|
|
|
|
> ### Heading in Directive
|
|
>
|
|
> some content inside.
|
|
|
|
## Code
|
|
|
|
> ```ts
|
|
> //#region a
|
|
> console.log('hello world');
|
|
> //#endregion
|
|
>
|
|
> export function fn() {
|
|
> //#region b
|
|
> console.log('one');
|
|
> //#region c
|
|
> return function nested() {
|
|
> console.log('two');
|
|
> //#endregion
|
|
> console.log('three');
|
|
> };
|
|
> //#endregion
|
|
> }
|
|
>
|
|
> ```
|
|
|
|
With Region:
|
|
|
|
> ```ts
|
|
> console.log('hello world');
|
|
> ```
|
|
|
|
With Nested Region:
|
|
|
|
> ```ts
|
|
> console.log('one');
|
|
> return function nested() {
|
|
> console.log('two');
|
|
> console.log('three');
|
|
> };
|
|
> ```
|
|
|
|
> ```ts
|
|
> return function nested() {
|
|
> console.log('two');
|
|
> ```
|