Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsible blocks with "+" are not rendered as an open block #3313

Closed
5 tasks done
chme opened this issue Dec 6, 2021 · 3 comments
Closed
5 tasks done

Collapsible blocks with "+" are not rendered as an open block #3313

chme opened this issue Dec 6, 2021 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@chme
Copy link

chme commented Dec 6, 2021

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Collapsible blocks (admonitions) with a + after the ??? token are not rendered as an open block.

Expected behaviour

Adding the + should render the block as open.

Actual behaviour

Block is rendered as closed

Steps to reproduce

You can see this behavior on the official documentation for mkdocs-material: https://squidfunk.github.io/mkdocs-material/reference/admonitions/#collapsible-blocks

The following block is not rendered as open:

???+ note

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
    nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
    massa, nec semper lorem quam in massa.

Package versions

  • Python: 3.9.9
  • MkDocs: 1.2.3
  • Material: 8.0.4

Configuration

site_name: My Docs
theme:
  name: material

markdown_extensions:
  - admonition
  - pymdownx.details
  - pymdownx.superfences

System information

  • Operating system: Linux (Solus OS)
  • Browser: Firefox 94
@facelessuser
Copy link
Contributor

I have confirmed this locally and this does indeed seem to be an issue with Mkdocs Material. Official docs seem to be afflicted as well: https://squidfunk.github.io/mkdocs-material/reference/admonitions/#collapsible-blocks.

@squidfunk squidfunk added the bug Issue reports a bug label Dec 6, 2021
@squidfunk
Copy link
Owner

squidfunk commented Dec 6, 2021

Thanks for reporting. It's a regression because the print$ observable will now also emit on first subscription whether the page is in print mode or not. This led to open details elements always being rendered closed. Should be fixed with accfc4f.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Dec 6, 2021
@squidfunk
Copy link
Owner

Released as part of 8.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants