Admonitions inside content tabs
kulttuuri opened this issue · comments
Aleksi Postari commented
Contribution guidelines
- I've read the contribution guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the problem doesn't occur with the
mkdocs
orreadthedocs
themes - ... the problem persists when all overrides are removed, i.e.
custom_dir
,extra_javascript
andextra_css
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
Hi!
I'm trying to add admonition inside a content tab, but that doesn't seem to work that way around. I have tried with collapsible and non-collapsible admonitions. I've tried for example this:
=== "View All Elements"
```py
print("Hello World")
```
???+ example "Example Output"
> Hello World
Expected behaviour
The expected behavior is for the admonition to render correctly.
Actual behaviour
This is what renders in the browser:
Steps to reproduce
- Create the block with this code:
=== "View All Elements"
```py
print("Hello World")
```
???+ example "Example Output"
> Hello World
- Does not render correctly.
Package versions
- Python: 3.9.10
- MkDocs: 1.3.0
- Material: 8.3.5+insiders.4.18.1
Configuration
site_name: Test Site
markdown_extensions:
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- admonition
- pymdownx.details
System information
- Operating system: MacOS
- Browser: Chrome
Martin Donath commented
Thanks for reporting. This is definitely a formatting issue. Please make sure that when using content tabs, nested content is always indented by four spaces. You're using 6, which is inconsistent with what SuperFences expects. This works:
=== "View All Elements"
```py
print("Hello World")
```
???+ example "Example Output"
> Hello World
Aleksi Postari commented
That was it, thank you! 👍