nowthis / sankeymatic

Make Beautiful Flow Diagrams
http://sankeymatic.com/build/
ISC License
841 stars 122 forks source link

Trim Zero-width spaces from inputs #54

Closed nowthis closed 2 years ago

nowthis commented 2 years ago

When copying text from some applications (such as PowerPoint), extra invisible characters can be included when pasted into the "Inputs" field.

This interferes with the process of matching up items by name.

The character is a Zero-width space, U+200B (ZWSP).

Example:

A [2] B(ZWSP)
B [2] C(ZWSP)

The two 'B' flows will not match up currently, since the ZWSP is counted as part of the first node name.

To solve this, I plan to have the input parser trim ZWSP characters from the starts and ends of lines (as SankeyMATIC already does for other space/blank characters).