Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ER diagram fails when column name starts with fk #3019

Closed
Lkopo opened this issue May 9, 2022 · 0 comments · Fixed by #3168
Closed

ER diagram fails when column name starts with fk #3019

Lkopo opened this issue May 9, 2022 · 0 comments · Fixed by #3168
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@Lkopo
Copy link

Lkopo commented May 9, 2022

Describe the bug
When column name in ER diagram starts with fk, mermaid takes it as a keyword instead which leads to syntax error.

To Reproduce
Use the following mermaid code:

erDiagram
        cool_table {
            int id_cool_table PK
            int fk_another_table
        }

Then you get the error:

Expecting 'ATTRIBUTE_WORD', got 'ATTRIBUTE_KEY'

Expected behavior
Rendered table with two columns id_cool_table and fk_another_table

Screenshots
image

@Lkopo Lkopo added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels May 9, 2022
sidharthv96 added a commit that referenced this issue Jun 22, 2022
sidharthv96 added a commit that referenced this issue Jun 28, 2022
* origin/develop: (24 commits)
  Updated the release version to 9.1.4
  Better balance check
  chore(deps-dev): bump @commitlint/config-conventional (#3179)
  chore(deps-dev): bump lint-staged from 13.0.2 to 13.0.3 (#3177)
  chore(deps-dev): bump cypress from 10.1.0 to 10.2.0 (#3178)
  chore(deps-dev): bump @commitlint/cli from 17.0.2 to 17.0.3 (#3180)
  chore: update browsers list
  fix: typo for source
  fix: typo in cypress
  Add dev install section in contributing.md
  update doc typos/clarity (#3145)
  Update links to `mermaid.live` (#3163)
  fix #3019 Add word boundary to FK&PK. (#3168)
  Run testomatio only for PRs within org. (#3165)
  chore(deps): bump got from 11.8.3 to 11.8.5 (#3172)
  fix: De-duplicates dependencies (#3167)
  Updated allowed characters to accomodate fonts and rgba colors
  fix: Typo for documents and comments
  Sanitizsation of incoming variables that are added to the userStyles
  Only allowing a subset of characters in themeVariables
  ...
sidharthv96 added a commit to sidharthv96/mermaid that referenced this issue Jun 30, 2022
* origin/master: (789 commits)
  Updated the release version to 9.1.4
  Better balance check
  chore(deps-dev): bump @commitlint/config-conventional (mermaid-js#3179)
  chore(deps-dev): bump lint-staged from 13.0.2 to 13.0.3 (mermaid-js#3177)
  chore(deps-dev): bump cypress from 10.1.0 to 10.2.0 (mermaid-js#3178)
  chore(deps-dev): bump @commitlint/cli from 17.0.2 to 17.0.3 (mermaid-js#3180)
  chore: update browsers list
  fix: typo for source
  fix: typo in cypress
  Add dev install section in contributing.md
  update doc typos/clarity (mermaid-js#3145)
  Update links to `mermaid.live` (mermaid-js#3163)
  fix mermaid-js#3019 Add word boundary to FK&PK. (mermaid-js#3168)
  Run testomatio only for PRs within org. (mermaid-js#3165)
  chore(deps): bump got from 11.8.3 to 11.8.5 (mermaid-js#3172)
  fix: De-duplicates dependencies (mermaid-js#3167)
  Updated allowed characters to accomodate fonts and rgba colors
  fix: Typo for documents and comments
  Sanitizsation of incoming variables that are added to the userStyles
  Only allowing a subset of characters in themeVariables
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant