Skip to content

Commit

Permalink
Merge branch 'master' into UG1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
daongochieu2810 authored Oct 27, 2020
2 parents 73f2505 + c1b2864 commit 61a9324
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/seedu/address/model/recipe/Recipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,13 @@ private String stringifyInstructions(ArrayList<Instruction> instructions) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < len; i++) {
Instruction instruction = instructions.get(i);
String instrStr = instruction.toString();
int firstBracket = instrStr.indexOf(")");
instrStr = instrStr.substring(firstBracket + 1);
if (i == len - 1) {
sb.append(instruction.toString());
sb.append(instrStr);
} else {
sb.append(instruction.toString() + ". ");
sb.append(instrStr + ". ");
}
}
return sb.toString();
Expand Down

0 comments on commit 61a9324

Please sign in to comment.