Dot.TsFull DOT/HTML escape of a label: & < > and double quotes become their entities. Labels may carry user input; unescaped they break the dot parser or the HTML label.
rank_source row is the rank=source block seating the given nodes; the TS form keeps the semicolon after the closing brace.
val state_node :
int ->
label:string ->
reward:string ->
url:string ->
cls:string ->
bold:bool ->
stringstate_node i ~label ~reward ~url ~cls ~bold is the state statement: the HTML label plus the optional reward fragment, the per-state SVG URL, the CSS class, and the bold style marker for the initial state (bold).
edge src dst ~label ~id ~cls is a transition statement with the vee arrowhead: the DTMC edges of the TS renderers and the action -> state transitions of the MDP renderers.