Skip to content

Commit c9c0c06

Browse files
authored
Merge pull request nus-cs2103-AY2122S1#76 from SHEZADHASSAN22/parseFirstArg-fix
fix parseFirstArgs
2 parents 509688b + 982a63c commit c9c0c06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/seedu/address/logic/parser/ParserUtil.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public static Module parseModule(String code, Optional<String> name) throws Pars
349349
* @throws ParseException if the args string is invalid.
350350
*/
351351
public static Type parseFirstArg(String args, String errorMessage) throws ParseException {
352-
String firstArg = args.split(" ", 2)[0];
352+
String firstArg = args.trim().split(" ", 2)[0];
353353
switch (firstArg) {
354354
case "mod":
355355
return Type.MOD;

0 commit comments

Comments
 (0)