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

When using fence mode, securityLevel will not be set #108

Open
evan361425 opened this issue Sep 5, 2024 · 1 comment
Open

When using fence mode, securityLevel will not be set #108

evan361425 opened this issue Sep 5, 2024 · 1 comment

Comments

@evan361425
Copy link

evan361425 commented Sep 5, 2024

mkdocs.yaml:

markdown_extensions:
- pymdownx.superfences:
    custom_fences:
    - name: mermaid
      class: mermaid
      format: !!python/name:mermaid2.fence_mermaid_custom
plugins:
- mermaid2:
    arguments:
      securityLevel: loose

when using above config, the dialog will not support html:

flowchart
  A[long<br>text] --> B

My currently workaround will be set theme by JS and disable the fence method.
However this method will cause the theme of dialog not changed after changing the theme of site (as document mentioned).

markdown_extensions:
# remove below setting
# - pymdownx.superfences:
plugins
- mermaid2:
    arguments:
      securityLevel: loose
      theme: |
        ^(JSON.parse(__md_get("__palette").index == 1)) ? 'dark' : 'light'
Copy link

github-actions bot commented Sep 5, 2024

Thank you for your contribution! This is very appreciated.

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

1 participant