Name Generation Functionality Error (cleanname)
Lee-WonJun opened this issue · 3 comments
Lee-WonJun commented
Description
# 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.
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 commented
I have noticed that this repository does not accept PRs. Therefore, I would like to share example commit
sualeh commented
@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 commented
that's find, i already printed my own mermaid code by my commit script