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

Tidy breaks mermaid (linebreaks in <div>) #87

Closed
ghost opened this issue Jan 5, 2015 · 2 comments
Closed

Tidy breaks mermaid (linebreaks in <div>) #87

ghost opened this issue Jan 5, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 5, 2015

Hello,

I'm running my site through tidy. Tidy is breaking mermaid, because it does not respect line breaks in <div> elements.

So this code:

<div class="mermaid">
sequenceDiagram
    participant Alice
    participant Bob
    Alice->John: Hello John, how are you?
    loop Healthcheck
        John->John: Fight against hypochondria
    end
    Note right of John: Rational thoughts <br/>prevail...
    John-->Alice: Great!
    John->Bob: How about you?
    Bob-->John: Jolly good!
</div>

Gets compressed into this code:

<div class="mermaid">sequenceDiagram participant Alice participant Bob Alice->John: Hello John, how are you? loop Healthcheck John->John: Fight against hypochondria end Note right of John: Rational thoughts <br/>prevail... John-->Alice: Great! John->Bob: How about you? Bob-->John: Jolly good!</div>

I tried to configure tidy to ignore the class "mermaid" div without success. My second thought was: What about changing mermaid to use semicolons as line separators (or anything else)?

Best Regards,
Stefan

@knsv
Copy link
Collaborator

knsv commented Jan 5, 2015

An optional ; as a line breaker is possible. Looking at a working prototype. A pity that this missed the recent release though :)

@ghost
Copy link
Author

ghost commented Jan 5, 2015

Oh, that's very cool! Thanks. I'll check the next release then.

@ghost ghost closed this as completed Jan 5, 2015
mgenereu referenced this issue in mgenereu/mermaid Jun 25, 2022
This issue was closed.
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