Merge pull request #1079 from igeni/regexp-fix

fixed regexp to add support of unicode for strings
This commit is contained in:
Alexander Wu 2024-04-05 22:08:40 +08:00 committed by GitHub
commit a9590854b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -486,7 +486,7 @@ class RebuildSequenceView(Action):
Returns:
List[str]: A list of participants extracted from the sequence diagram.
"""
pattern = r"participant ([a-zA-Z\.0-9_]+)"
pattern = r"participant ([\w\.]+)"
matches = re.findall(pattern, mermaid_sequence_diagram)
matches = [re.sub(r"[\\/'\"]+", "", i) for i in matches]
return matches