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.

Encoded characters are not correctly counted for node size

See original GitHub issue

Describe the bug

When using special characters in encoded form, such as #quot; the resulting box is too wide. It clearly counts all of the characters in the encoded form, but then renders the character … without shrinking the size of the box.

To Reproduce

  • Create a diagram that uses #quot;s inside a node, such as:
graph TD
A["#quot;Christmas#quot;"] -->|Get money| B(Go shopping)

Or in the editor

Expected behavior

#quot; should be counted as only one character for determining the width of the node.

Screenshots

Screen Shot 2019-10-05 at 9 43 33 PM

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sukhbeersinghcommented, Oct 10, 2019

Hi, Id like to take a look into this. Can you direct me how to start?

0reactions
imperator-maximuscommented, Feb 20, 2022

workaround for #quot;: just just use ” instead of " or #quot;

Read more comments on GitHub >

github_iconTop Results From Across the Web

What can cause string length to be incorrectly reported in ...
Back to your problem: In UTF-8 or 16 one character may be encoded by more than one byte. So html.length can indeed be...
Read more >
What every JavaScript developer should know about Unicode
Unicode in JavaScript: basic concepts, escape sequences, normalization, surrogate pairs, combining marks and how to avoid pitfalls.
Read more >
Restrictions and conventions for naming objects - Azure DevOps
Common restrictions include not exceeding the character length for a name, not containing special characters, and maintaining uniqueness of ...
Read more >
ECE264: Huffman Coding - Purdue Engineering
In ASCII coding, every character is encoded (represented) with the same number ... The specific structure of the tree determines the coding of...
Read more >
Quick and easy way of counting UTF-8 characters in Javascript
You see, the problem is that when Javascript was first created it didn't had proper UTF-8 support. Javascript's internal encoding is UCS-2 or ......
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