File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/main/java/seedu/duke/flashcard Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,15 @@ public class FlashcardCommandParser {
24
24
public FlashcardCommand parseInput (String input ) {
25
25
assert input != null : "input is null" ;
26
26
27
- input = input .toLowerCase ();
27
+ input = input .toLowerCase (). strip () ;
28
28
29
- if (input .strip (). startsWith ("create flashcard" )) {
29
+ if (input .equals ("create flashcard" )) {
30
30
return new CreateFlashcardCommand ();
31
- } else if (input .strip (). startsWith ("list flashcards" )) {
31
+ } else if (input .equals ("list flashcards" )) {
32
32
return new ListFlashcardsCommand ();
33
33
} else if (input .startsWith ("review flashcards" )) {
34
34
return new StartReviewCommand (input );
35
- } else if (input .strip (). startsWith ("delete all flashcards" )) {
35
+ } else if (input .equals ("delete all flashcards" )) {
36
36
return new DeleteAllFlashcardsCommand ();
37
37
} else if (input .startsWith ("delete flashcard" )) {
38
38
return new DeleteFlashcardCommand (input );
You can’t perform that action at this time.
0 commit comments