Skip to content

Is there a way for the display mode to work with line breaks? #3277

Answered by frnsys
frnsys asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for your quick response. I'm using auto-render. This is the snippet I'm using:

document.addEventListener("DOMContentLoaded", function() {
    renderMathInElement(document.body, {
        delimiters: [
          {left: "$$", right: "$$", display: true},
          {left: "¦", right: "¦", display: false},
        ]
    });
});

It is applied to HTML generated from markdown, so the actual HTML it's dealing with looks like:

<p>
$$<br>
x+2<br>
$$
</p>

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@edemaine
Comment options

@frnsys
Comment options

Answer selected by frnsys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants