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

Spantable: does not work with mkdocs-material admonitions #30

Open
HuangFuSL opened this issue Dec 30, 2022 · 1 comment
Open

Spantable: does not work with mkdocs-material admonitions #30

HuangFuSL opened this issue Dec 30, 2022 · 1 comment

Comments

@HuangFuSL
Copy link

HuangFuSL commented Dec 30, 2022

Hi. I'm using mkdocs-plugins and mkdocs-material to build my personal blog. Thanks for your work, these plugins really help a lot.

However, once when I was trying to put a table into an admonition tab provided by mkdocs-material, I found that spantable fails to be rendered inside the tab while a normal markdown table works as expected. Here is a minimal test markdown file to reproduce these results.

environment

  • mkdocs==1.4.2
  • neoteroi-mkdocs==1.0.0
  • mkdocs-material==8.5.11

A full environment configuration can be found here.

mkdocs configuration

This is a simplified configuration, only part of configuration fields are listed below. A full mkdocs configuration can be found here.

theme:
  name: material

markdown_extensions:
  - admonition
  - neoteroi.spantable

extra_css:
  - https://www.neoteroi.dev/mkdocs-plugins/css/neoteroi.css

test file

Documentation of mkdocs-material admonitions can be found here.

# Spantable test

??? note "This is a spantable"

    ::spantable::

    | Country      | Address                                                  |
    | ------------ | -------------------------------------------------------- |
    | France @span | 8 Rue St Ferréol - 92190 City: Meudon (Île-de-France)    |
    |              | 50 boulevard Amiral Courbet - 94310 Orly (Île-de-France) |
    |              | ...                                                      |
    |              | ...                                                      |
    | Italy @span  | Str. S. Maurizio, 12, 10072 Caselle torinese TO          |
    |              | S.S. Torino-Asti - 10026 Santena (TO)                    |
    |              | ...                                                      |
    | Poland @span | al. Jana Pawła II 22, 00-133 Warszawa                    |
    |              | plac Trzech Krzyży 4/6, 00-535 Warszawa                  |
    |              | ...                                                      |
    |              | ...                                                      |

    ::end-spantable::

??? note "This is a normal markdown table"

    | Country      | Address                                                  |
    | ------------ | -------------------------------------------------------- |
    | France       | 8 Rue St Ferréol - 92190 City: Meudon (Île-de-France)    |
    | Italy        | Str. S. Maurizio, 12, 10072 Caselle torinese TO          |
    | Poland       | al. Jana Pawła II 22, 00-133 Warszawa                    |

test result

Spantable:

image

Markdown table:

image

@PlasmaHH
Copy link

PlasmaHH commented Jun 6, 2024

Just came here to repor the same thing. Similarily it does not work for tabs and other things that need indentation.

My guess here is that this plugin does not pick up the amount of indentation present in the definition and gives back the generated code with zero indentation but the tabs, admonitions etc. expect it to still be indented to be picked up.

At least doing it that way with the standard markdown syntax leads to the same broken appearance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants