typestate-rs icon indicating copy to clipboard operation
typestate-rs copied to clipboard

Mermaid formatting may need escaped; Enum outputs produce floating markup blocks

Open Dessix opened this issue 2 years ago • 0 comments

The choice enum results appear to produce weird markup and visual results: image With the following signature:

pub enum ConnectionResult {
  Connected,
  Disconnected,
}

And the following markup...

<div class="mermaid">
stateDiagram-v2
[*] --> Initial : new
state ConnectionResult <<choice>>
Initial --> ConnectionResult : connect
ConnectionResult --> Connected
ConnectionResult --> Disconnected
Disconnected --> [*] : close
Connected --> Disconnected : disconnect
</div>

The <<choice>> seems to be producing issues; Replacing it with &lt;&lt;choice&gt;&gt; eliminates the issue, but changing the region to <pre> does not. I suspect the output for mermaid blocks needs to be escaped.

Dessix avatar Jul 08 '22 23:07 Dessix