Mermaid: Sequencediagram text with <br /> BR tag with space fails

Created on 25 Jul 2018  路  7Comments  路  Source: mermaid-js/mermaid

This works

working example

sequenceDiagram
    participant Joe
    participant Alice
    Joe->>Alice: Foo
    Note over Alice: Bar<br/>Baz
    Note over Joe,Alice: That note above should have had a carriage return between Bar and Baz

but this, with a space between the r and / fails by rendering the <br /> as text not as a line break. One tricky thing is that if you look at it in the interactive view, and then type something on the line with the <br /> it displays correctly, but the view link continues to display incorrectly.

non working example

sequenceDiagram
    participant Joe
    participant Alice
    Joe->>Alice: Foo
    Note over Alice: Bar<br />Baz
    Note over Joe,Alice: That note above should have had a carriage return between Bar and Baz

This may relate to some challenges people had in #384

Development Sequence Retained Approved Bug / Error

Most helpful comment

This seems to be similar to #1088. Looking at the commit mentioned above, the regex <br\/?> is used to determine the lines. This takes care of <br> and <br/> but does not find <br />.

If noone else is already working on this issue, I can take a look at it.

All 7 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@watsoncj You'd said that PR #764 fixes this bug, but when I go and test the non working example above, it still manifests this bug.

@tylerlong merged your PR into 7.0.2 but the bug persists in the current version of 8.1.0.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you are still interested in it, and it is still relevant, you can comment or remove the label to revive it.

@watsoncj You'd said that PR #764 fixes this bug, but when I go and test the non working example above, it still manifests this bug.

@tylerlong merged your PR into 7.0.2 but the bug persists in the current version of 8.3.0.

@knsv Could you remove the stale / Status: Wontfix label that the @github-actions bot applied as this issue is still outstanding and waiting on a reply from @watsoncj or a fix?

This seems to be similar to #1088. Looking at the commit mentioned above, the regex <br\/?> is used to determine the lines. This takes care of <br> and <br/> but does not find <br />.

If noone else is already working on this issue, I can take a look at it.

PR coming up for the weekend I suppose.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

p3k picture p3k  路  13Comments

queses picture queses  路  17Comments

crusty picture crusty  路  22Comments

SteveEdson picture SteveEdson  路  16Comments

Anachron picture Anachron  路  16Comments