question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inline Admonition Overlap

See original GitHub issue

I’ve found a bug and checked that …

  • … the problem doesn’t occur with the default MkDocs template
  • … the problem is not in any of my customizations (CSS, JS, template)
  • … the documentation does not mention anything about my problem
  • … there are no open or closed issues that are related to my problem

Description

Inline end admonitions are overlapped by regular admonitions when previously they would be well padded and contained.

Expected behavior

No overlap between admonitions.

Actual behavior

image

Steps to reproduce the bug

Markdown:

# Admonition Test

!!! info inline end 
    I too am an admonition.
    
!!! warning
    I am an admonition.

Package versions

  • Python: 3.7.3
  • MkDocs: 1.1.2
  • Material: 7.0.5+insiders.2.2.1

Project configuration

site_name: My Docs
theme:
  name: material
markdown_extensions:
  - admonition

System information

  • OS: linux-gnu

  • Browser: Chrome

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
squidfunkcommented, Mar 14, 2021

That was a fast fix – c6e15970.

1reaction
squidfunkcommented, Mar 14, 2021

FYI, I’m only able to reproduce this error if you use inline admonitions inside admonitions. If you use them on the top-level the margins are correct. This is not related to the current issue, but you can open a new one if you like:

Bildschirmfoto 2021-03-14 um 12 55 29

Markdown to reproduce:

!!! example "Example"

    !!! info inline "Result:"

        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.

    **Markdown:**

    ```md
    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.
    ```

---

!!! info inline end "Result:"

    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.

**Markdown:**

```md
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.
```

---

!!! info inline "Result:"

    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.

**Markdown:**

```md
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.
```
Read more comments on GitHub >

github_iconTop Results From Across the Web

Inline admonitions/details overlap other details #2336 - GitHub
When you set an admonition or detail block as inline, following admonition blocks will adapt to its size, but detail blocks will stay...
Read more >
Help:Formatting Templates - OpenGL Wiki
Admonitions are paragraphs that are offset from the main flow of the text, usually to indicate a notification of some kind.
Read more >
How can I make inline (i.e., not floating) admonition blocks in ...
How can I make admonition blocks that are 'inline' with surrounding text and reflow with it (unlike floating elements such as figures) ...
Read more >
Changelog - Material for MkDocs - GitHub Pages
Modernized appearance of admonitions (with fallback, see docs); Improved appearance of inline code blocks in admonition titles ...
Read more >
Convertng Markdown admonition syntax to HTML, using Lua ...
RawInline ('html', '</div>') } ) end end. preview output(the first paragraph) $ pandoc test.md --lua-filter f.lua <div class="admonition ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found