Skip to content

Commit

Permalink
fix(app): Fix dumping issue
Browse files Browse the repository at this point in the history
- Replace escaped single quotes and newlines
- Remove control characters
  • Loading branch information
[email protected] committed Oct 15, 2024
1 parent cdd0eb9 commit d5b4405
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/Generators/GithubCopilotCliGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public function generate(string $prompt): string
->dump()
->match('/\{.*\}/s')
->dump()
// ->replace(
// ["\\'", PHP_EOL],
// ["'", '']
// )
->replace(
["\\'", PHP_EOL],
["'", '']
)
->dump()
->replaceMatches('/[[:cntrl:]]/mu', '')
// ->replaceMatches('/[[:cntrl:]]/mu', '')
->dump();
}
}

0 comments on commit d5b4405

Please sign in to comment.