Skip to content

Commit d2d5290

Browse files
docs: improve sectionization example
1 parent c9905c3 commit d2d5290

File tree

2 files changed

+44
-10
lines changed

2 files changed

+44
-10
lines changed

docs/ja/vfm.md

+22-5
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,15 @@ ruby rt {
586586

587587
## Level 2
588588

589-
> # Not Sectionize
589+
### Level 3
590+
591+
##
592+
593+
Level 2 was ended by `##`.
594+
595+
## Not Sectionize {.just-a-heading} ##
596+
597+
> # Not Sectionize in Blockquote
590598
```
591599

592600
**HTML**
@@ -605,10 +613,15 @@ ruby rt {
605613
<h1 id="level-1">Level 1</h1>
606614
<section class="level2" aria-labelledby="level-2">
607615
<h2 id="level-2">Level 2</h2>
608-
<blockquote>
609-
<h1 id="not-sectionize">Not Sectionize</h1>
610-
</blockquote>
616+
<section class="level3" aria-labelledby="level-3">
617+
<h3 id="level-3">Level 3</h3>
618+
</section>
611619
</section>
620+
<p>Level 2 was ended by <code>##</code>.</p>
621+
<h2 class="just-a-heading" id="not-sectionize">Not Sectionize</h2>
622+
<blockquote>
623+
<h1 id="not-sectionize-in-blockquote">Not Sectionize in Blockquote</h1>
624+
</blockquote>
612625
</section>
613626
```
614627

@@ -617,7 +630,11 @@ ruby rt {
617630
```css
618631
body > section {
619632
}
620-
body > section > h1:first-child {
633+
634+
section[aria-labelledby="intro"] {
635+
}
636+
637+
section:has(> h1.title) {
621638
}
622639

623640
.level1 {

docs/vfm.md

+22-5
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,15 @@ Make the heading a hierarchical section.
586586

587587
## Level 2
588588

589-
> # Not Sectionize
589+
### Level 3
590+
591+
##
592+
593+
Level 2 was ended by `##`.
594+
595+
## Not Sectionize {.just-a-heading} ##
596+
597+
> # Not Sectionize in Blockquote
590598
```
591599

592600
**HTML**
@@ -605,10 +613,15 @@ Make the heading a hierarchical section.
605613
<h1 id="level-1">Level 1</h1>
606614
<section class="level2" aria-labelledby="level-2">
607615
<h2 id="level-2">Level 2</h2>
608-
<blockquote>
609-
<h1 id="not-sectionize">Not Sectionize</h1>
610-
</blockquote>
616+
<section class="level3" aria-labelledby="level-3">
617+
<h3 id="level-3">Level 3</h3>
618+
</section>
611619
</section>
620+
<p>Level 2 was ended by <code>##</code>.</p>
621+
<h2 class="just-a-heading" id="not-sectionize">Not Sectionize</h2>
622+
<blockquote>
623+
<h1 id="not-sectionize-in-blockquote">Not Sectionize in Blockquote</h1>
624+
</blockquote>
612625
</section>
613626
```
614627

@@ -617,7 +630,11 @@ Make the heading a hierarchical section.
617630
```css
618631
body > section {
619632
}
620-
body > section > h1:first-child {
633+
634+
section[aria-labelledby="intro"] {
635+
}
636+
637+
section:has(> h1.title) {
621638
}
622639

623640
.level1 {

0 commit comments

Comments
 (0)