Skip to content

Commit

Permalink
Merge branch 'master' into 2100-widget-info
Browse files Browse the repository at this point in the history
  • Loading branch information
gok99 authored Aug 14, 2024
2 parents bc567f1 + 03dd38d commit f424712
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 39 deletions.
1 change: 1 addition & 0 deletions docs/ug/runSh.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ Depending on which version you wish to use for report generation, add one of the
* `--release`: Use the latest release (Stable)
* `--master`: Use the latest version of the master branch
* `--tag TAG` (e.g. `--tag v1.6.1`): Use the version identified by the Git tag given
* `--latest TAG_PREFIX`: Use the latest version with the given tag prefix (e.g. `--latest v1.6` can use `v1.6.1`)
* `--commit COMMIT` (e.g. `--commit abc123`): Use the version identified by the Git commit SHA given
98 changes: 64 additions & 34 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"minimatch": "^9.0.0",
"muicss": "^0.10.3",
"normalize.css": "^8.0.1",
"postcss": "^8.4.38",
"postcss": "^8.4.39",
"pug-lint-vue": "^0.4.0",
"seedrandom": "^3.0.5",
"vue": "~3.4.0",
Expand All @@ -56,7 +56,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-vue": "^9.0.0",
"postcss-html": "^1.6.0",
"pug": "^3.0.2",
"pug": "^3.0.3",
"pug-plain-loader": "^1.1.0",
"sass": "^1.71.0",
"sass-loader": "^14.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/reposense/RepoSense.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
public class RepoSense {
private static final Logger logger = LogsManager.getLogger(RepoSense.class);
private static final int SERVER_PORT_NUMBER = 9000;
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("E MMM d HH:mm:ss yyyy z");
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("E, d MMM yyyy HH:mm:ss z");
private static final String VERSION_UNSPECIFIED = "unspecified";

/**
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/reposense/parser/BlurbMarkdownParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ public BlurbMap parse() throws IOException, InvalidMarkdownException {
// extract the url record first
// this is guaranteed to be in the first line or else we fail
UrlRecord urlRecord = this.getUrlRecord(mdLines, counter);
// if delimiter is the last non-blank line, null is returned
if (urlRecord == null) {
break;
}
url = urlRecord.getUrl();
counter = urlRecord.getNextPosition();

Expand Down Expand Up @@ -120,9 +124,17 @@ private UrlRecord getUrlRecord(List<String> lines, int position) throws InvalidM
// checks if url is valid
// adapted from https://www.baeldung.com/java-validate-url
try {
String url = lines.get(position).strip();
String url = "";
// skips blank lines
while (url.length() == 0) {
// checks if delimiter is the last non-blank line
if (position >= lines.size()) {
return null;
}
url = lines.get(position++).strip();
}
new URL(url).toURI();
return new UrlRecord(lines.get(position), position + 1);
return new UrlRecord(url, position);
} catch (MalformedURLException | URISyntaxException ex) {
throw new InvalidMarkdownException("URL provided is not valid!");
}
Expand Down
1 change: 1 addition & 0 deletions src/systemtest/resources/ConfigSystemTest/blurbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ https://www.github.com/user/repo/branch2

this is what i have done for my cs2103t project
<!--repo-->

https://www.github.com/user/repo/branch3
*third blurb*

Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/BlurbMarkdownParserTest/multiple_blurbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Master branch of testrepo-Beta
https://github.com/reposense/testrepo-Gamma/tree/master
Master branch of testrepo-Gamma
<!--repo-->

https://github.com/reposense/testrepo-Sigma/tree/master
Master branch of testrepo-Sigma
<!--repo-->

0 comments on commit f424712

Please sign in to comment.