Open shobhitg opened 10 years ago
Apologies for necroing this ancient issue but I was also hoping for a solution and there now seems to be a provision for that in the code and I thought I would document it for future visitors. You can add a !
before the string and it will end up being enclosed by <...>
in the dotfile.
e.g.
const n1 = g.addNode('APIGW', {
label: '!<B>API</B> <i>Gateway</i>',
});
comes out as:
"APIGW" [ label =<<B>API</B> <i>Gateway</i>> ];
I think this issue can be closed.
Dot specification has HTML-like labels.
They are generally like:
label=<<FONT POINT-SIZE='12'>Some Text</FONT>>
The issue is that Graphviz doesn't understand it if that html label is quoted like this:
label="<<FONT POINT-SIZE='12'>Some Text</FONT>>"
In the attributes js file,
lbl
is of typelblString
, which means it would be quoted. https://github.com/glejeune/node-graphviz/blob/master/lib/deps/attributs.js#L59We need a way to say if our label is a string or an html markup. Based on that it must be quoted or not.
I don't know what would be an elegant solution to this.
Any fixes (or even ideas) would be awesome?