fixed regexp to add support of unicode for strings

This commit is contained in:
igeni 2024-03-22 16:00:26 +03:00
parent 933a242370
commit 960ad61064

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