typestate-rs
typestate-rs copied to clipboard
Mermaid formatting may need escaped; Enum outputs produce floating markup blocks
The choice enum results appear to produce weird markup and visual results:
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 <<choice>>
eliminates the issue, but changing the region to <pre>
does not. I suspect the output for mermaid blocks needs to be escaped.