Skip to content

Commit

Permalink
fix(ui): check for end quote
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxuum committed Sep 28, 2024
1 parent 8a9b162 commit 6f1e040
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ui/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export const terminalTextParts = computed(() => {
export const atNextPart = computed(() => {
const parts = terminalTextParts();
const textPart = parts[parts.size() - 1] as string | undefined;
const quoted = textPart?.match(`^(['"])`) !== undefined;

const startQuote = textPart?.match(`^(['"])`);
const endQuote = textPart?.match(`(['"])%s*$`);
const quoted = startQuote !== undefined && endQuote === undefined;
return terminalText().sub(-1) === " " && !quoted;
});
export const terminalTextValid = atom(false);
Expand Down

0 comments on commit 6f1e040

Please sign in to comment.