Graphviz Issue Tracker - graphviz
View Issue Details
0002524graphvizDotpublic2015-03-05 18:052015-03-06 12:09
0002524: fails to parse backslash in the end of label text
Consider the following input (

digraph g {
1 -> 2 [label="\\"]

I expect single backslash as a label.
See file in attach. Got an error:

$ dot -Tpng -o1.png
$ Warning: syntax error in line 2 near ''
Reproduced with graphviz-2.39.20150305.0545 (also 2.38 and 2.36), 2.26 worked fine.

Is there another way to draw trailing backslashes (preferably portable between graphviz versions) ?
No tags attached.
dot (34) 2015-03-05 18:05
Issue History
2015-03-05 18:05skvadrikNew Issue
2015-03-05 18:05skvadrikFile Added:
2015-03-05 18:42northNote Added: 0000886
2015-03-06 04:41skvadrikNote Added: 0000887
2015-03-06 04:47skvadrikNote Edited: 0000887bug_revision_view_page.php?bugnote_id=887#r244
2015-03-06 11:54skvadrikNote Added: 0000889
2015-03-06 11:56skvadrikNote Edited: 0000889bug_revision_view_page.php?bugnote_id=889#r246
2015-03-06 12:09ergAssigned To => erg
2015-03-06 12:09ergStatusnew => resolved
2015-03-06 12:09ergResolutionopen => fixed

2015-03-05 18:42   
I couldn't reproduce this bug (Graphviz 2.39, latest, built on OSX). I get a single backslash as a label. I agree that this behavior is important. This specific feature was worked on several times over the years. I don't know what's going wrong. In the past, there were situations where test scripts were actually processing the graph through the shell an extra time and eating one of the backslashes, but the submission shows a simple command line execution with the test graph in a file. I'm stumped.
2015-03-06 04:41   
(edited on: 2015-03-06 04:47)
Built from git:

$ git clone [^]
$ cd graphviz
$ ./
$ ./configure --prefix=<prefix>
$ make -j5
$ make install
$ <prefix>/bin/dot -Tpng -o1.png

Works fine (draws single backslash). Maybe I'll try to bisect.

I found two runnable programs: cmd/dot/dot (bash script) and cmd/dot/.libs/dot (executable). Bash script fails:

$ cmd/dot/dot -Tpng -o1.png
$ Warning: syntax error in line 4 near ''

While executable works fine:

$ cmd/dot/.libs/dot -Tpng -o1.png

2015-03-06 11:54   
(edited on: 2015-03-06 11:56)
Bisected, faulty behaviour was fixed by commit 386e47c14b3a8e83bdf3ec8772963213095a7294: "Remove change made in d19b672a3c06f0ae95b1da38b63b068f71eb266f until we can remember why this change was made."