Custom fence not adding correct class #2708
-
My custom fence doesn't seem to be getting rendered with the designated class. I'm using the following packages:
And I have the following markdown extensions setup: markdown_extensions:
- def_list
- pymdownx.highlight:
anchor_linenums: true
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets:
check_paths: true
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- admonition
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.saneheaders
- pymdownx.extra The relevant bit being the custom fence for mermaid. The problem is that the appropriate ```mermaid flowchart LR A --> B ``` It's rendering with the I can tell that mermaid is on the page, because it does render when I put my diagram content inside a I've messed around with a lot of little things to fix this (e.g. removed all other |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Issues here should provide minimal, reproducible examples. I hope you understand that I don't have time to debug someone's documentation setup, especially not rebuilding an example from scratch when they don't provide a simple zip that I can download and try. While we use Mkdocs for our documentation, we don't directly provide debugging support for MkDocs and their 3rd party plugins and themes. With that said, I understand that there are many that use Mkdocs, but don't understand the underlying libraries underneath and how they are used, and maybe cannot construct an example outside the context of MkDocs. So in the context MkDocs and suspected bugs with Markdown parsing related to our extensions, because that is the only thing we support here, I would ask that if a MkDocs example is all that the user can provide, that a minimal zip is provided with only the Markdown extensions required to produce the bug, not MkDocs extensions that have nothing to do with what we support. Since you are a user of Material for MkDocs, they do have dedicated documentation that describes how to create minimal reproductions with their theme and give good advise to generally follow. Now, I did spend a little time and created my own minimal example showcasing that the feature does work. If you are still having issues, please use the zip I attached as a template and provide only what is necessary to demonstrate the issue. Since I've demonstrated Mermaid is working in the context of Material for Mkdocs, which it seems you are using, I will consider this question answered. |
Beta Was this translation helpful? Give feedback.
Issues here should provide minimal, reproducible examples.
I hope you understand that I don't have time to debug someone's documentation setup, especially not rebuilding an example from scratch when they don't provide a simple zip that I can download and try. While we use Mkdocs for our documentation, we don't directly provide debugging support for MkDocs and their 3rd party plugins and themes.
With that said, I understand that there are many that use Mkdocs, but don't understand the underlying libraries underneath and how they are used, and maybe cannot construct an example outside the context of MkDocs.
So in the context MkDocs and suspected bugs with Markdown parsing related to our ext…