summaryrefslogtreecommitdiff
blob: b4e911de6a94d3b4aa26143182672b64558f7ca8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
User reported a regression between 2.26 and 2.36
when trying to .dot the following graph:

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

2.26 shows it as '\' while 2.36 fails as:
    $ dot -Tpng a.dot -o a.png
    Warning: 1.dot: syntax error in line 2 near ''

Thanks to Ulya Trofimovich who found and bisected
the problem down to this commit, which fixes problem
only in git version.

commit 386e47c14b3a8e83bdf3ec8772963213095a7294
Author: Emden R. Gansner <erg@alum.mit.edu>
Date:   Thu Jan 30 08:45:06 2014 -0500

    Remove change made in d19b672a3c06f0ae95b1da38b63b068f71eb266f until we can
    remember why this change was made.

diff --git a/lib/cgraph/scan.l b/lib/cgraph/scan.l
index 0a31f0c..5bb30b7 100644
--- a/lib/cgraph/scan.l
+++ b/lib/cgraph/scan.l
@@ -199,6 +199,7 @@ ID		({NAME}|{NUMBER})
 ["]						BEGIN(qstring); beginstr();
 <qstring>["]			BEGIN(INITIAL); endstr(); return (T_qatom);
 <qstring>[\\]["]		addstr ("\"");
+<qstring>[\\][\\]		addstr ("\\\\");
 <qstring>[\\][\n]		line_num++; /* ignore escaped newlines */
 <qstring>([^"\\]*|[\\])		addstr(yytext);
 [<]						BEGIN(hstring); html_nest = 1; beginstr();