Skip to content

Commit

Permalink
Fix display text when marking version
Browse files Browse the repository at this point in the history
  • Loading branch information
suganyasuven committed Feb 15, 2021
1 parent 22614f6 commit 5166b3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/ballerinalang/command/util/ToolUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -833,13 +833,13 @@ public static String getType(String version) {
* @param version distribution version
*/
public static String getTypeName(String version) {
char lastChar = version.charAt(version.length() - 1);
if (version.contains("1.")) {
return "jballerina" + " version " + version;
} else if(version.contains("slp")) {
char lastChar = version.charAt(version.length() - 1);
return " Preview " + lastChar;
} else {
String versionId = version.substring(2);
String versionId = version.substring(2, version.length() - 1) + " " + lastChar;
return versionId.substring(0, 1).toUpperCase() + versionId.substring(1);
}
}
Expand Down

0 comments on commit 5166b3d

Please sign in to comment.