Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MUYSC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jorge Alfredo Jaimes Teherán
MUYSC
Commits
53020d1c
Unverified
Commit
53020d1c
authored
3 years ago
by
Aaron Newman
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
DOCS: Warning not to nest headers in admonitions (#1479)
parent
4434ef42
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/content/content-blocks.md
+22
-0
22 additions, 0 deletions
docs/content/content-blocks.md
docs/interactive/hiding.md
+6
-0
6 additions, 0 deletions
docs/interactive/hiding.md
with
28 additions
and
0 deletions
docs/content/content-blocks.md
+
22
−
0
View file @
53020d1c
...
...
@@ -233,6 +233,28 @@ This is the *content*
See [](myst-parser:syntax/html-admonition) for more information about HTML admonitions.
(content-blocks:warning-headers-admonitions)=
### Do not embed headings inside admonitions
You should **not** embed headings (lines starting with `#`) inside of admonitions, dropdowns, or other content blocks such as this.
Sphinx (and thus Jupyter Book) uses headings to define the major top-level sections of a document.
For this reason, nesting a heading within a block will cause unpredictable breakage of the document structure.
`````{admonition} Do not do this
:class: warning
For example, **do not do this**:
````
```{note}
## This heading is inside an admonition, and will mess things up!
Don't do this!
```
````
`````
To achieve a similar effect, write some **bold text** instead of using a markdown header.
(content/panels)=
## Panels
...
...
This diff is collapsed.
Click to expand it.
docs/interactive/hiding.md
+
6
−
0
View file @
53020d1c
...
...
@@ -43,6 +43,12 @@ There are two ways to hide Markdown content
Both allow you to wrap chunks of Markdown in a button that lets users show
and hide the content.
:::{caution}
Don't put markdown headers inside of toggle or dropdown content, see
[](
content-blocks:warning-headers-admonitions
)
for more information.
:::
### The `{toggle}` directive
You can activate a toggleable behavior in Markdown with the
`{toggle}`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment