Skip to content

Commit c2c9dc5

Browse files
committed
FIXED: Properly emit multi-line node labels with option ‘label’.
The fix is t o perform ‘<’ and ‘>’ escaping after (was: before) ‘<BR/>’ tags are inserted. This fixes issue #1.
1 parent a7e12f2 commit c2c9dc5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

prolog/dot.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@
115115
% multi-line label
116116
dot_attribute_(label, Values, Attr) :-
117117
is_list(Values), !,
118-
maplist([Value,Line]>>format(string(Line), "~w", [Value]), Values, Lines),
119-
atomics_to_string(Lines, "<BR/>", Unescaped),
120-
dot_html_replace(Unescaped, Escaped),
121-
format(string(Attr), "label=<~s>", [Escaped]).
118+
maplist([Value,Line]>>format(string(Line), "~w", [Value]), Values, Lines1),
119+
maplist(dot_html_replace, Lines1, Lines2),
120+
atomics_to_string(Lines2, "<BR/>", Lines3),
121+
format(string(Attr), "label=<~s>", [Lines3]).
122122
% single-line label
123123
dot_attribute_(label, Value, Attr) :- !,
124124
dot_attribute_(label, [Value], Attr).

0 commit comments

Comments
 (0)