Spaces:
Sleeping
Sleeping
Sávio Santos
commited on
Commit
·
7db460b
1
Parent(s):
8a70f03
return last match
Browse files- src/utils.py +2 -1
src/utils.py
CHANGED
@@ -10,5 +10,6 @@ def get_prompt(message):
|
|
10 |
def get_processed_response(response):
|
11 |
matches = re.findall(r"@startuml(.*?)@enduml", response, re.DOTALL)
|
12 |
if matches:
|
13 |
-
|
|
|
14 |
return "@startuml\n@enduml"
|
|
|
10 |
def get_processed_response(response):
|
11 |
matches = re.findall(r"@startuml(.*?)@enduml", response, re.DOTALL)
|
12 |
if matches:
|
13 |
+
last_match = matches[-1].strip()
|
14 |
+
return f"@startuml\n{last_match}\n@enduml"
|
15 |
return "@startuml\n@enduml"
|