ivan-m / graphviz

Haskell bindings to the Graphviz toolkit
Other
64 stars 24 forks source link

Escaping curly braces, vertical bars, and angle brackets in record-based nodes #15

Closed marc-reh closed 7 years ago

marc-reh commented 7 years ago

I would like to suggest the addition of curly braces, vertical bars and angle brackets to the definition of escape letters (letters for which a preceding slash is not escaped).

In Printing.hs:

escLetters = Set.fromList ['N', 'G', 'E', 'T', 'H', 'L', 'n', 'l', 'r','{','}','|','<','>']

See also http://www.graphviz.org/doc/info/shapes.html#record

ivan-m commented 7 years ago

Except there is explicit support for record labels already.

This escape list is used everywhere for the definition of strings (e.g. identifiers), not just for labels, so it can't be used like that.

marc-reh commented 7 years ago

I wasn't aware of the explicit support for record labels. Using them, I don't need to escape curly braces etc. anymore and can use graphviz as is. Thanks!