Skip to content

Commit ade11ac

Browse files
committed
fix: fix code command output
1 parent 1336ac3 commit ade11ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/command/code.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ func (c *Code) Prompts(input string) []string {
5454

5555
// Handle copy code in the reply to clipboard, and return the original reply
5656
func (c *Code) Handle(reply string) {
57-
code := extractCode(reply)
57+
code := reply
58+
if strings.Contains(reply, "```") {
59+
code = extractCode(reply)
60+
}
5861
fmt.Println(code)
5962
fmt.Println()
6063
if code != "" {

0 commit comments

Comments
 (0)