mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 17:29:54 +02:00
feat(er): use square brackets to add aliases
This commit is contained in:
@@ -146,15 +146,15 @@ The `type` values must begin with an alphabetic character and may contain digits
|
||||
|
||||
### Entity Name Aliases (v<MERMAID_RELEASE_VERSION>+)
|
||||
|
||||
An alias can be added to an entity using `as` keyword. If provided, the alias will be showed in the diagram instead of the entity name.
|
||||
An alias can be added to an entity using square brackets. If provided, the alias will be showed in the diagram instead of the entity name.
|
||||
|
||||
```mermaid-example
|
||||
erDiagram
|
||||
p as Person {
|
||||
p[Person] {
|
||||
string firstName
|
||||
string lastName
|
||||
}
|
||||
a as "Customer Account" {
|
||||
a["Customer Account"] {
|
||||
string email
|
||||
}
|
||||
p ||--o| a : has
|
||||
|
Reference in New Issue
Block a user