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

Name Generation Functionality Error (cleanname) #1179

Closed
Lee-WonJun opened this issue Jun 27, 2023 · 3 comments
Closed

Name Generation Functionality Error (cleanname) #1179

Lee-WonJun opened this issue Jun 27, 2023 · 3 comments
Assignees
Labels

Comments

@Lee-WonJun
Copy link

Description

code

# Mermaid only allows alphanumeric identifiers
def cleanname(name):
    namepattern = r'[^0-9a-zA-Z]'
    cleanedname = re.sub(namepattern, '', name)
    if not cleanedname:
        cleanedname = "UNKNOWN"
    return cleanedname

cleanname function is filter via regex in mermaid.py

But as I see, Mermaid supports dashes (-) and underscores (_) as well, and specifically, underscores are commonly used in DB schema.

image
link

so IMHO, we can modify regex in mermaid.py

How to Reproduce

No response

Relevant log output

No response

SchemaCrawler Version

SchemaCrawler 16.19.11

Java Version

Eclipse Adoptium OpenJDK 64-Bit Server VM 17.0.7+7

Operating System and Version

Windows 11 10.0

Relational Database System and Version

Postgres

JDBC Driver and Version

@Lee-WonJun
Copy link
Author

I have noticed that this repository does not accept PRs. Therefore, I would like to share example commit

sualeh added a commit that referenced this issue Jun 27, 2023
@sualeh sualeh closed this as completed in 721f788 Jun 27, 2023
@sualeh
Copy link
Collaborator

sualeh commented Jun 27, 2023

@Lee-WonJun Thanks for the detailed issue description, and example commit. This will be released in the next release. Is this blocking you, or can you wait for the next release?

@Lee-WonJun
Copy link
Author

that's find, i already printed my own mermaid code by my commit script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants