Mermaid erDiagram direction does not work in Obsidian

I’m trying to change the layout of a Mermaid ER diagram in Obsidian v1.9.14.

When I use the following Mermaid code block:

erDiagram 
 direction LR
  A ||--o{ B : "has"
  B ||--o{ C : "contains"

I get this result:

However, I expect the diagram to render left-to-right, like this:

Is it possible that the Mermaid version bundled with Obsidian doesn’t yet support the direction parameter for erDiagram?

Steps to Reproduce

  1. Create a new note in Obsidian.
  2. Add the following code block:
erDiagram
  direction LR
  A ||--o{ B : "has"
  B ||--o{ C : "contains"
  1. Observe that the diagram renders top-to-bottom instead of left-to-right.

It is possible. If that feature was added recently, it is likely. For various reasons, Obsidian’s developers take a relatively slow approach to updating its dependencies. Credits - Obsidian Help shows Obsidian is using Mermaid 11.4.1.