Skip to content

Commit

Permalink
fix: fix code command output
Browse files Browse the repository at this point in the history
  • Loading branch information
shellfly committed Mar 29, 2023
1 parent 1336ac3 commit ade11ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/command/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ func (c *Code) Prompts(input string) []string {

// Handle copy code in the reply to clipboard, and return the original reply
func (c *Code) Handle(reply string) {
code := extractCode(reply)
code := reply
if strings.Contains(reply, "```") {
code = extractCode(reply)
}
fmt.Println(code)
fmt.Println()
if code != "" {
Expand Down

0 comments on commit ade11ac

Please sign in to comment.