mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
Expand native Mermaid flowchart syntax support (#48895)
## What changed - Default `flowchart` and `graph` to top-down layout when no direction is specified. - Support solid and dashed edges with directed, undirected, or bidirectional endpoints: `-->`, `---`, `<-->`, `-.->`, `-.-`, and `<-.->`. - Accept pipe labels on these edges and spaced directed infix labels such as `A -- send --> B` and `A -. retry .-> B`. - Expand `&` groups into all source-to-target edges, including in chains. For example, `A & B --> C & D` creates four edges. Enforce the 24-edge limit after expansion and cap each group at 24 node references. ## Testing Add coverage for equivalent syntax, edge styles and endpoints, malformed input, and expansion limits. Extend rendering snapshots across all four directions and the TUI native-renderer test with the new syntax. GitOrigin-RevId: 6e51653ebf6b8b7e7e1edec0c2e09a5d9c8dec74
This commit is contained in:
@@ -21,6 +21,7 @@ fn mermaid_fences_use_native_renderer_for_every_family() {
|
||||
for source in [
|
||||
"%% heading\nflowchart TD; A --> B",
|
||||
"graph LR; A --> B",
|
||||
"flowchart; A -- send --> B & C; B <-.-> C",
|
||||
"sequenceDiagram; A->>B: request; B-->>A: response",
|
||||
"stateDiagram-v2; [*] --> Active; Active --> [*]",
|
||||
"stateDiagram; [*] --> Active; Active --> [*]",
|
||||
|
||||
Reference in New Issue
Block a user