Skip to content

Commit ee28d50

Browse files
committed
handle brackets in .dot file node labels
1 parent e663ea2 commit ee28d50

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/STATview.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ def create_temp(dot_filename, truncate, max_node_name):
324324
attrs["label"] = node_attr_to_label(attrs, False)
325325
output_line = '\t%s [' % id
326326
for key in attrs.keys():
327+
if key == 'function' or key == 'label':
328+
if attrs[key].find('{') != -1:
329+
attrs[key] = attrs[key].replace('{', '\{').replace('}', '\}')
327330
if key == 'label':
328331
label = escaped_label(attrs[key])
329332
original_label = label

0 commit comments

Comments
 (0)