glejeune / Ruby-Graphviz

[MIRROR] Ruby interface to the GraphViz graphing tool
https://gitlab.com/glejeune/ruby-graphviz
Other
608 stars 116 forks source link

label HTML with table not working #129

Open andresgutgon opened 7 years ago

andresgutgon commented 7 years ago

Hi, I'm running example73.rb but adding this line:

g.add_nodes "TABLE_EXAMPLE", label: '<TABLE><TR><TD>Hello World</TD></TR></TABLE>'

The result is not parsed as an HTML table: image

Any idea why this is not working?

waynr commented 7 years ago

@andresgutgon probably because you didn't include the enclosing angle brackets in the label string. Try:

g.add_nodes "TABLE_EXAMPLE", label: '<<TABLE><TR><TD>Hello World</TD></TR></TABLE>>'

See the graphviz docs for more info: http://graphviz.org/content/node-shapes#html