Skip to content

Commit

Permalink
Remove hardcoded text
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Jan 27, 2025
1 parent 08d021a commit 8e037db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/services/DemoCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class DemoCreator {
const end = selection.end.line;

let position: string | number = selection.start.line + 1;
if (action !== "insert" && action !== "unselect") {
if (action !== Action.Insert && action !== Action.Unselect) {
position = start === end ? start + 1 : `${start + 1}:${end + 1}`;
}

Expand All @@ -160,17 +160,17 @@ export class DemoCreator {
};

// Unselect doesn't need the position
if (action === "unselect") {
if (action === Action.Unselect) {
delete step.position;
}

// The save action doesn't need the position and path
if (action === "save") {
if (action === Action.Save) {
delete step.position;
delete step.path;
}

if (action === "insert" || action === "write") {
if (action === Action.Insert || action === Action.Write) {
step.content = modifiedText;
}

Expand Down

0 comments on commit 8e037db

Please sign in to comment.