瀏覽代碼

Merge pull request #2612 from arkohut/support-py-for-run-code

feat: support py Python for code execution
Timothy Jaeryang Baek 11 月之前
父節點
當前提交
9d370c51e2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/lib/components/chat/Messages/CodeBlock.svelte

+ 1 - 1
src/lib/components/chat/Messages/CodeBlock.svelte

@@ -215,7 +215,7 @@ __builtins__.input = input`);
 		<div class="p-1">{@html lang}</div>
 
 		<div class="flex items-center">
-			{#if lang === 'python' || (lang === '' && checkPythonCode(code))}
+			{#if lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code))}
 				{#if executing}
 					<div class="copy-code-button bg-none border-none p-1 cursor-not-allowed">Running</div>
 				{:else}