nidi3 / graphviz-java

Use graphviz with pure java
Apache License 2.0
934 stars 106 forks source link

Line Break problems with update from 0.10.2 to 0.17.0 #182

Closed maxweissboeck closed 3 years ago

maxweissboeck commented 3 years ago

We use graphviz-java in an Eclipse + Xtext environment on Windows to visualise flows to business people.
Problem we have with version 0.17.0 is as following: Longer texts will be (by our Xtext Generator) automatically cut in shorter text strings, using \n In Eclipse Windows, with native settings (we need this, because we also connect to other systems), this results in \n\r as the final input to graphviz-java.

This was no problem in version 0.10.2, a text like:

"This long line\n\r is to long."

was displayed inside the graph as

"This long line is to long."

Now with version 0.17.0 the result in the graph is:

"**This long line

is to long.**" So there is an extra empty line now, that should not be there in a Windows environment. Is there any setting to avoid this? Or any param to respect the operating systems defaults? Thanks, Max
nidi3 commented 3 years ago

all the quoting and escaping is not too easy 😓

nidi3 commented 3 years ago

btw I hope you mean \r\n not \n\r

maxweissboeck commented 3 years ago

Sorry, it is \r\n you are right