Skip to content

Commit

Permalink
fix that one bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zunda-arrow committed Mar 8, 2023
1 parent 0a46451 commit faad258
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bot/message_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ async def _parse_message(
else:
code_lines = match.group().splitlines()

runtime_name = code_lines[0].removeprefix("```")
runtime_name = code_lines[0].strip().removeprefix("```")
code = "\n".join(code_lines[1:-1])

if message_args := self._find_args(message):
# The runtime name and version in the message takes priority over
# the runtime name in the codeblock.
runtime_name = message_args.runtime_name
runtime_version = message_args.runtime_version
runtime_name = runtime_name or message_args.runtime_name
runtime_version = runtime_version or message_args.runtime_version
args = message_args.args
compiler_args = message_args.compiler_args
stdin = message_args.stdin
Expand Down

0 comments on commit faad258

Please sign in to comment.