Skip to content

Commit

Permalink
update regext
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartManoj committed Aug 21, 2024
1 parent 6e3b713 commit 8a7fccc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/services/terminalService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import ActionType from "#/types/ActionType";
import Session from "./session";

export function sendTerminalCommand(command: string): void {
// replace END OF TEXT character copied from terminal
// replace ^c character when copied from terminal
// eslint-disable-next-line no-control-regex
const cleanedCommand = command.replace(/\u0003+/, "");
const cleanedCommand = command.replace(/\u0003\b/, "");
if (!cleanedCommand) return;
const event = { action: ActionType.RUN, args: { command: cleanedCommand } };
const eventString = JSON.stringify(event);
Expand Down

0 comments on commit 8a7fccc

Please sign in to comment.