Gbury / ocaml-memgraph

A small library to output memory graph for ocaml values

Repository from Github https://github.comGbury/ocaml-memgraphRepository from Github https://github.comGbury/ocaml-memgraph

Some of the colour arguments being passed to Graphviz are unquoted

erkin opened this issue · comments

Normally Graphviz accepts unquoted keywords (such as SVG or X11 colours) but hex values must be quoted. Calling memgraph after initialising the config with unquoted hex values triggers a syntax error. The following is how I properly configure the colours:

let config =
  Memgraph.Dot.config
    ~external_node_color:(Some "#bababa")
    ~block_node_color:(Some "#535955")
    ~root_node_color:(Some "#0a0a0a")
    ~outline_color:"\"#cccccc\""
    ~background_color:(Some "\"#252a2a\"")
    ~direction:`Horizontal
    ()

From a cursory look at the code, I suspect only the values parsed in styles_with_color get properly quoted and the others parsed in print_list don't.

Interesting, I'll look at quotation in the dot output this week.

This is now fixed, sorry about the delay in solving this.