Skip to content

Commit b5c6ec2

Browse files
committed
savedot: HTML labels no longer quoted.
When employing a HTML label on a vertex, savedot used to add additional double quotes. Upon processing the file, DOT then shows the literal HTML string instead of parsing it. This is corrected now.
1 parent d12c16e commit b5c6ec2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/persistence.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ function savedot(io::IO, g::AbstractMetaGraph)
3737
end
3838
for p in props(g, v)
3939
key = p[1]
40-
write(io, "$key=\"$(p[2])\",")
40+
if key .=== :label && occursin(r"<+.*>+$", p[2])
41+
# The label is an HTML string, no additional quotes here.
42+
write(io, "$key=$(p[2]),")
43+
else
44+
write(io, "$key=\"$(p[2])\",")
45+
end
4146
end
4247
if length(props(g, v)) > 0
4348
write(io, "];")

0 commit comments

Comments
 (0)