question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Line breaks are rendered as <br> and not <br/> in the resulting svg file, resulting in parsing errors for external svg parsers

See original GitHub issue

Describe the bug Line breaks are rendered as <br> and not <br/> in the resulting svg file, resulting in parsing errors for external svg parsers

To Reproduce Render the diagram

graph TD
    F[Line break `<br/>` Line 2] --> R

<br/> gets rendered as <br>

Expected behavior <br/> and <br> and <br /> should get rendered as <br/> to be valid xml and parse correctly in more parsers.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
knsvcommented, Nov 12, 2020

What a silly problem. We must fix this.

0reactions
titibanditcommented, Jan 31, 2021

rendering my graph

graph TB
    F{the line <br/> after breaking} --> R

using

{
  "flowchart": {
    "htmlLabels": false
  }
}

as a config file works! Line breaks are now rendered. I use mermaid-cli to generate my chart, and view the resulting SVGs in Firefox.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parser error displayed when rendering SVG with UTF-8 ...
When rendering SVG passed via a pipe and using --pipe where the SVG contains UTF-8 encoded characters, I get a parser error similar...
Read more >
How to linebreak an svg text within javascript? - Stack Overflow
It's not like we've set up the width of the container to something fix, so that it can impose line breaking, have we?...
Read more >
Beautiful Soup Documentation — Beautiful Soup 4.4.0 ...
Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide...
Read more >
Make line breaks work when you render text in a React or Vue ...
The first thing you can do is split up the string and then render the resulting <br /> tags. function replaceWithBr() { return...
Read more >
Original HTML Proposal for Inline SVG - w3.org - W3C
The resulting confusion — with validators claiming documents to have one ... Conformance checkers are not required to recover from parse errors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found