Skip to content

Commit 12943ab

Browse files
authored
Merge pull request #73 from hrshdhgd/issue-72
Handle newline characters and double quotes in commands.
2 parents eaadbcc + 7a55470 commit 12943ab

File tree

1 file changed

+2
-3
lines changed
  • src/ontobot_change_agent

1 file changed

+2
-3
lines changed

src/ontobot_change_agent/cli.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -201,18 +201,17 @@ def process_issue(
201201
)
202202
break
203203

204-
elif re.match(r"(.*)ontobot(.*)apply(.*):(.*)", issue[BODY]):
204+
elif re.match(r"(.*)ontobot(.*)apply(.*):(.*)", issue[BODY], re.DOTALL):
205205
formatted_body = "The following commands were executed: </br> "
206206
bullet_starters = ["* ", "- "]
207207
for bullet in bullet_starters:
208208
KGCL_COMMANDS.extend(
209209
[
210-
str(item).replace(bullet, "")
210+
str(item).replace(bullet, "").replace('"', "'")
211211
for item in issue[BODY].splitlines()
212212
if item.lstrip().startswith(bullet)
213213
]
214214
)
215-
216215
KGCL_COMMANDS = [x.strip() for x in KGCL_COMMANDS]
217216

218217
else:

0 commit comments

Comments
 (0)