Giter VIP home page Giter VIP logo

Comments (3)

NicolasNewman avatar NicolasNewman commented on May 20, 2024

It appears that none of the MathML related HTML is appended to the diagram on GitHub

GitHub:
image

Local webpage:
image

from mermaid.

NicolasNewman avatar NicolasNewman commented on May 20, 2024

I will be jotting down some of my findings here as I'm essentially debugging within the issue itself.

The expected HTML that should be contained within span.katex for the above test:

<foreignObject width="75.03334045410156" height="92.21665954589844">
    <div style="display: inline-block; white-space: nowrap;" xmlns="http://www.w3.org/1999/xhtml"><span
            class="nodeLabel"><br>
            <div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;"><br> <span
                    class="katex"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
                        <mrow>
                            <msqrt>
                                <mfrac>
                                    <mrow>
                                        <mi>π</mi>
                                        <mo stretchy="false">(</mo>
                                        <mn>1</mn>
                                        <mo></mo>
                                        <mi>π</mi>
                                        <mo stretchy="false">)</mo>
                                    </mrow>
                                    <mi>n</mi>
                                </mfrac>
                            </msqrt>
                        </mrow>
                    </math></span><br> </div><br>
        </span></div>
</foreignObject>

Pasting it directly into the issues DOM tree renders correctly with the proper sizing:
image

from mermaid.

NicolasNewman avatar NicolasNewman commented on May 20, 2024

GitHub's implementation of Mermaid

sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
    iframe->>dotcom: iframe ready
    dotcom->>iframe: set mermaid data on iframe
    iframe->>iframe: render mermaid

I'll keep investigating but currently it seems that the issue arises in the viewscreen component. If that's the case, it will be very difficult to isolate the issue on our end.

from mermaid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.