Commit 7951c93
committed
👌 offset nested headers by current heading level
This makes it so nested headings (in blockquotes, admonitions, etc.)
generates rubrics that are offset by the current heading level,
meaning that:
```markdown
# Title
## Sub-title
> Quote:
> # Title in quote
> Content.
```
will generate a rubric level 3 (level 1 + offset by 2 by the "Sub-title")
inside the blockquote.
This also makes those rubrics support the Sphinx option `heading-level`,
for properly generating `<h1>`, `<h2>`, etc.1 parent 9b76910 commit 7951c93
3 files changed
Lines changed: 23 additions & 6 deletions
File tree
- myst_parser/mdit_to_docutils
- tests/test_renderers/fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
| 828 | + | |
| 829 | + | |
828 | 830 | | |
829 | 831 | | |
| 832 | + | |
830 | 833 | | |
831 | 834 | | |
832 | 835 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | 131 | | |
| |||
0 commit comments