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

Replaced div for pre when rendering raw to avoid newline issue #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

h3
Copy link

@h3 h3 commented May 4, 2023

I couldn't get the project working with sphinx/rst, only the graph type worked.

After switching the html node type to "pre" it finally worked for all graph types.

@mgaitan
Copy link
Owner

mgaitan commented May 4, 2023

@h3 which version of mermaid are you using? Do you know if this work with older (let say 9.x) versions? does the aligning still work correctly ?

@niecore
Copy link

niecore commented Jun 1, 2023

Tested with mermaid 9.4.3 and had the same issue.

extensions = [
    "myst_parser",
    "sphinxcontrib.mermaid"
]

source_suffix = {
    '.rst': 'restructuredtext',
    '.md': 'markdown',
}

mermaid_version = "9.4.3"
myst_fence_as_directive = ["mermaid"]
# Test Markdown Page

```{mermaid}
graph LR
a --> b

Edit: changing div to pre in the html files solves the issue.

@Notmarrco
Copy link

Not exactly the same issue, but some themes are minifying html, and doing so they scrumble mermaid code. It could help if the nodes were "pre", forcing them to keep the mermaid code as is.

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

Successfully merging this pull request may close these issues.

None yet

4 participants